no-skip-without-reason

July 2, 2026 ยท View on GitHub

๐Ÿ“ Require a reason when skipping or marking a test as todo.

๐Ÿšซ This rule is disabled in the following configs: โœ… recommended, โ˜‘๏ธ unopinionated.

A skipped or todo test with no explanation leaves the next reader guessing why it is disabled and whether it is safe to re-enable. node:test lets you attach a reason: the skip/todo options accept a string, and the test context methods t.skip() / t.todo() accept a message that is shown in the test results.

This rule reports {skip: true} / {todo: true} options (where a reason string should be used instead) and t.skip() / t.todo() calls with no message. It is off by default.

Chained modifiers (test.skip(โ€ฆ)) have no way to attach a reason, so they are not reported; use the options form with a reason instead.

Examples

import test from 'node:test';

// โŒ
test('flaky thing', {skip: true}, () => {});
test('wip', t => {
	t.todo();
});

// โœ…
test('flaky thing', {skip: 'fails intermittently, see #123'}, () => {});
test('wip', t => {
	t.todo('blocked on the parser rewrite');
});