Skip to content

Latest commit

 

History

History
29 lines (22 loc) · 458 Bytes

no-conditional-tests.md

File metadata and controls

29 lines (22 loc) · 458 Bytes

Disallow conditional tests (vitest/no-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()
	})
})