Docs (4.0.0)
Test context

useTestContext

Clears the current global app context and initializes a test context.

useTestContext(config?: ConfigOptions.Arg<TestContextOptions>): TestContext

Parameters

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`
});