TestContext class

Context that is passed to a testing function, which can be used to either gain information about the current test, or register additional test steps within the current test.

Available extensions
Annotations
  • @JS()
  • @staticInterop
  • @anonymous

Constructors

TestContext.new({String? name, String? origin, TestContext? parent})
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
name String

Available on TestContext, provided by the TestContext$Typings extension

The current test name.
getter/setter pair
origin String

Available on TestContext, provided by the TestContext$Typings extension

The string URL of the current test.
getter/setter pair
parent TestContext?

Available on TestContext, provided by the TestContext$Typings extension

If the current test is a step of another test, the parent test context will be set here.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
step → ({Future<bool> Function(TestStepDefinition definition) $1, Future<bool> Function(FutureOr<void> fn(TestContext)) $2, Future<bool> Function(String name, FutureOr<void> fn(TestContext)) $3})

Available on TestContext, provided by the TestContext$Typings extension

Overload accessor: $1, $2, $3
no setter

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