Docs (4.0.0)
Tests

describe

Creates a new test scope.

describe(name: string, f: (scope: TestScope) => void): void

Parameters

  • name — The name of the test scope
  • f — A function that’s run immediately, which should add tests using the test() function. The new TestScope instance is passed as the only argument.

Example

// define a simple test:
describe("Math", (scope) => {
  test("One plus one", () => {
    expect(1 + 1).toBe(2);
  });
});

Static Members