Skip to content

Latest commit

 

History

History
28 lines (19 loc) · 505 Bytes

File metadata and controls

28 lines (19 loc) · 505 Bytes

vitest/no-duplicate-hooks

📝 Disallow duplicate hooks and teardown hooks.

⚠️ This rule warns in the 🌐 all config.

Rule Details

This rule aims to prevent duplicate hooks and teardown hooks.

Examples of incorrect code for this rule:

test('foo', () => {
  beforeEach(() => {})
  beforeEach(() => {}) // duplicate beforeEach
})

Examples of correct code for this rule:

test('foo', () => {
  beforeEach(() => {})
})