vitest-v5
Installation
SKILL.md
Vitest Best Practices
Comprehensive performance optimization and best practices guide for Vitest 5. Contains 44 rules across 8 categories, prioritized by impact to guide test writing, refactoring, and code review.
Assumptions
- Vitest 5+ (
vitest^5). Node.js >= 22.12. Vite >= 6.4. Migration: https://vitest.dev/guide/migration/ vi.mock,vi.unmock, andvi.hoistedmust be top-level. Nested calls throw in v5clearMocksdefaults totrue(call history cleared before each test)test.sequential/describe.sequential/sequentialare removed. Useconcurrent: falseorsequence: { concurrent: false }