vitest/no-conditional-tests
January 2, 2026 ยท View on GitHub
๐ Disallow conditional tests.
โ ๏ธ This rule warns in the ๐ all config.
Rule Details
Examples of incorrect code for this rule:
describe('my tests', () => {
if (true) {
it('is awesome', () => {
doTheThing()
})
}
})
Examples of correct code for this rule:
describe('my tests', () => {
it('is awesome', () => {
doTheThing()
})
})