
Vitest
This is a prioritized collection of 44 Vitest testing rules organized into eight categories, from critical async patterns and test isolation down to lower priority concerns like test organization. What makes it useful is the explicit priority system: you know to fix async await issues and mock cleanup before worrying about snapshot formatting. It covers the tricky parts like vi.mock hoisting behavior, choosing between spyOn and mock, and performance tuning with pools and sharding. The quick reference table lets you scan by impact level, which beats scrolling through alphabetical lists when you're debugging flaky tests at 3pm. If you're migrating from Jest or trying to speed up your CI pipeline, the performance and mocking sections are worth reading first.
- skills.sh installs
- 7.2K
- GitHub stars
- 222
- last updated
- Aug 21, 2026
Install
$ npx -y skills add pproenca/dot-skills --skill vitest --agent claude-codeInstalls into .claude/skills of the current project.
Files
Vitest Best Practices
Comprehensive performance optimization and best practices guide for Vitest testing framework. Contains 44 rules across 8 categories, prioritized by impact to guide test writing, refactoring, and code review.
When to Apply
Reference these guidelines when:
- Writing new Vitest tests
- Debugging flaky or slow tests
- Setting up test configuration
- Reviewing test code in PRs
- Migrating from Jest to Vitest
- Optimizing CI/CD test performance
Rule Categories by Priority
| Priority | Category | Impact | Prefix |
|---|---|---|---|
| 1 | Async Patterns | CRITICAL | async- |
| 2 | Test Setup & Isolation | CRITICAL | setup- |
| 3 | Mocking Patterns | HIGH | mock- |
| 4 | Performance | HIGH | perf- |
| 5 | Snapshot Testing | MEDIUM | snap- |
| 6 | Environment | MEDIUM | env- |
| 7 | Assertions | LOW-MEDIUM | assert- |
| 8 | Test Organization | LOW | org- |
Quick Reference
1. Async Patterns (CRITICAL)
Sponsors
Details
- Repository
- github.com/pproenca/dot-skills
- Categories
- Backend & APIs, Testing & QA, Documentation, Debugging
- First seen
- May 16, 2026
More from pproenca/dot-skills
All 100- React Hook Form3.1K
- Emilkowal Animations2.8K
- Nuqs2.4K
- Clean Architecture2K
- Typescript1.8K
- Code Simplifier1.6K
- Expo React Native Performance1.5K
- Nextjs1.2K
- Playwright1.2K
- Framer Motion1.2K
- Wxt Browser Extensions1.1K
- Msw897
- Tanstack Query858
- Clean Code857
- Terminal Ui853
- Ui Design827
- Typescript Refactor799
- React Refactor791
- Chrome Extension Ui732
- Shadcn732
- Chrome Extension729
- Shell704
- Tailwind657
- Refactor651