no-commented-tests
July 2, 2026 ยท View on GitHub
๐ Disallow commented-out tests.
๐ซ This rule is disabled in the following configs: โ
recommended, โ๏ธ unopinionated.
Commented-out tests are dead code that can silently accumulate. Use .skip() to temporarily disable tests so they remain visible and tracked by the runner. Commented-out hooks (before, after, beforeEach, afterEach) are flagged too โ remove them since hooks have no .skip().
Examples
import test from 'node:test';
// โ
// test('foo', () => {});
// โ
// describe('group', () => {});
// โ
// beforeEach(() => {});
// โ
test.skip('foo', () => {});
// โ
test('foo', () => {});