Skip to main content

class SuiteContext

An instance of SuiteContext is passed to each suite function in order to interact with the test runner. However, the SuiteContext constructor is not exposed as part of the API.

Properties #

#filePath: string | undefined
readonly

The absolute path of the test file that created the current suite. If a test file imports additional modules that generate suites, the imported suites will return the path of the root test file.

#name: string
readonly

The name of the suite.

#signal: AbortSignal
readonly

Can be used to abort test subtasks when the test has been aborted.

Did you find what you needed?

Privacy policy