useTestContext
Clears the current global app context and initializes a test context.
useTestContext(config?: ConfigOptions.Arg<TestContextOptions>): TestContext
Parameters
- config — A TestContextOptions object, or a callback to set options
Return value
The app global context, typed as TestContext.
Example
describe("My scope", (scope) => {
scope.beforeEach(() => {
useTestContext((options) => {
options.path = "foo"
options.renderFrequency = 5;
});
});
// ... add some tests here, to use `app`
});