TestDefinition class
- Available extensions
- Annotations
-
- @JS()
- @staticInterop
- @anonymous
Constructors
-
TestDefinition.new({FutureOr<
void> fn(TestContext)?, String? name, bool? ignore, bool? only, bool? sanitizeOps, bool? sanitizeResources, bool? sanitizeExit, Object? permissions}) -
factory
Properties
-
fn
↔ FutureOr<
void> Function(TestContext) -
Available on TestDefinition, provided by the TestDefinition$Typings extension
getter/setter pair - hashCode → int
-
The hash code for this object.
no setterinherited
- ignore ↔ bool?
-
Available on TestDefinition, provided by the TestDefinition$Typings extension
If truthy the current test step will be ignored.getter/setter pair - name ↔ String
-
Available on TestDefinition, provided by the TestDefinition$Typings extension
The name of the test.getter/setter pair - only ↔ bool?
-
Available on TestDefinition, provided by the TestDefinition$Typings extension
If at least one test hasonly
set totrue
, only run tests that haveonly
set totrue
and fail the test suite.getter/setter pair - permissions ↔ Object?
-
Available on TestDefinition, provided by the TestDefinition$Typings extension
Specifies the permissions that should be used to run the test.getter/setter pair - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sanitizeExit ↔ bool?
-
Available on TestDefinition, provided by the TestDefinition$Typings extension
Ensure the test case does not prematurely cause the process to exit, for example via a call to {@linkcode Deno.exit}.getter/setter pair - sanitizeOps ↔ bool?
-
Available on TestDefinition, provided by the TestDefinition$Typings extension
Check that the number of async completed operations after the test step is the same as number of dispatched operations. This ensures that the code tested does not start async operations which it then does not await. This helps in preventing logic errors and memory leaks in the application code.getter/setter pair - sanitizeResources ↔ bool?
-
Available on TestDefinition, provided by the TestDefinition$Typings extension
Ensure the test step does not "leak" resources - like open files or network connections - by ensuring the open resources at the start of the test match the open resources at the end of the test.getter/setter pair
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited