Skip to content

Latest commit

 

History

History
29 lines (20 loc) · 452 Bytes

File metadata and controls

29 lines (20 loc) · 452 Bytes

vitest/no-conditional-in-test

📝 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)
})