vitest/no-commented-out-tests

January 2, 2026 ยท View on GitHub

๐Ÿ“ Disallow commented out tests.

๐Ÿ’ผโš ๏ธ This rule is enabled in the โœ… recommended config. This rule warns in the ๐ŸŒ all config.

Rule Details

This rule aims to prevent commented out tests.

Examples of incorrect code for this rule:

// test('foo', () => {
//   expect(1).toBe(1)
// })

Examples of correct code for this rule:

test('foo', () => {
  expect(1).toBe(1)
})