TestContext
An instance of TestContext
is passed to each test function in order to interact with the test runner. However, the TestContext
constructor is not exposed as part of the API.
Since
v18.0.0, v16.17.0
Properties
Functions
Link copied to clipboard
This function is used to create a hook that runs after the current test finishes.
Link copied to clipboard
This function is used to create a hook running after each subtest of the current test.
Link copied to clipboard
This function is used to create a hook running before subtest of the current test.
Link copied to clipboard
This function is used to create a hook running before each subtest of the current test.
Link copied to clipboard
This function is used to write diagnostics to the output. Any diagnostic information is included at the end of the test's results. This function does not return a value.
Link copied to clipboard