todo
Adds a test case that will be marked as ‘to do’.
static
todo(name: string, f?: (test: TestCase) => void | Promise<void>): void
Notes
- The test function won’t be called at all.
- Tests marked as ‘to do’ are considered failures, even without an error.
Example
// define a test case that's marked as to do:
describe("Something", () => {
test.todo("Test my new feature")
test.todo("Complete me", () => {
let result = undefined; // to do
expect(result).toBe(1);
})
});
Related
- function test(name, f)Adds a test case in the current scope.