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