π todo
.todo
is an extended helper for describe
, it
, and test
to assist you plan future tests.
Basic Usageβ
Simple messageβ
import { describe, it, test } from 'poku';
describe.todo('todo: Upcoming test');
it.todo('todo: Upcoming test');
test.todo('todo: Upcoming test');
- There is no difference between the features.
Also in internal contexts:
import { describe, it } from 'poku';
describe(() => {
it.todo('todo: Upcoming test');
it('Real test', () => {
/* ... */
});
});
Ignoring a callbackβ
This can be useful when you already have an idea or prototype of what you want to test, but you don't want the test to actually run.
It can also be useful for tests that have unexpectedly stopped working due to some external event, requiring further attention.
import { describe, it } from 'poku';
describe.todo('todo: Upcoming test', () => {
it(async () => {
process.exit(1);
});
});
- The method received by
todo
and everything inside it will be completely ignored.
note
- When using
beforeEach
orafterEach
, they will not be triggered by tests with.todo
. - Skipped tests are considered successful tests and don't affect the file test count.