Skip to content

Latest commit

 

History

History
28 lines (18 loc) · 504 Bytes

no-duplicate-hooks.md

File metadata and controls

28 lines (18 loc) · 504 Bytes

Disallow duplicate hooks and teardown hooks (vitest/no-duplicate-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(() => {})
})