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, and vi.hoisted must be top-level. Nested calls throw in v5
  • clearMocks defaults to true (call history cleared before each test)
  • test.sequential / describe.sequential / sequential are removed. Use concurrent: false or sequence: { concurrent: false }

When to Apply

Installs
15
GitHub Stars
1
First Seen
Sep 17, 2026