RunOptions

sealed external interface RunOptions(source)

Properties

Link copied to clipboard
abstract var concurrency: Any?

If a number is provided, then that many test processes would run in parallel, where each process corresponds to one test file. If true, it would run os.availableParallelism() - 1 test files in parallel. If false, it would only run one test file at a time.

Link copied to clipboard
abstract var files: ReadonlyArray<String>?

An array containing the list of files to run. If omitted, files are run according to the test runner execution model.

Link copied to clipboard
abstract var forceExit: Boolean?

Configures the test runner to exit the process once all known tests have finished executing even if the event loop would otherwise remain active.

Link copied to clipboard
abstract var inspectPort: Any?

Sets inspector port of test child process. If a nullish value is provided, each process gets its own port, incremented from the primary's process.debugPort.

Link copied to clipboard
abstract var only: Boolean?

If truthy, the test context will only run tests that have the only option set

Link copied to clipboard
abstract var setup: (reporter: TestsStream) -> PromiseResult<Void>?

A function that accepts the TestsStream instance and can be used to setup listeners before any tests are run.

Link copied to clipboard
abstract var shard: TestShard?

Running tests in a specific shard.

Link copied to clipboard
abstract var signal: AbortSignal?

Allows aborting an in-progress test execution.

Link copied to clipboard
abstract var testNamePatterns: Any?

If provided, only run tests whose name matches the provided pattern. Strings are interpreted as JavaScript regular expressions.

Link copied to clipboard
abstract var testSkipPatterns: Any?

A String, RegExp or a RegExp Array, that can be used to exclude running tests whose name matches the provided pattern. Test name patterns are interpreted as JavaScript regular expressions. For each test that is executed, any corresponding test hooks, such as beforeEach(), are also run.

Link copied to clipboard
abstract var timeout: Double?

The number of milliseconds after which the test execution will fail. If unspecified, subtests inherit this value from their parent.

Link copied to clipboard
abstract var watch: Boolean?

Whether to run in watch mode or not.