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
- function parallel(name, f) staticCreates a new test scope, with tests that will be started in parallel.
- function skip(name, f) staticCreates a new test scope that’s skipped (including all tests).
- function only(name, f) staticCreates a new test scope that’s run exclusively.