New advertisers: 50% off your first month with code FIRSTMONTHSee slots

Catalog of 44 Vitest best-practice rules covering async tests, setup, mocking, performance, and snapshots.

skills.sh installs
7.7K
GitHub stars
227
last updated
Aug 21, 2026
View on GitHub

What it does

  • Covers 8 categories ranked by impact: async patterns, test setup and isolation, mocking, performance, snapshots, environment, assertions, and organization
  • Lists 44 named rules with prefixes such as async-, setup-, mock-, and perf-, each with a linked reference file
  • Guides fixing false-positive async assertions, vi.mock hoisting, vi.spyOn versus vi.mock, pool selection, and happy-dom versus jsdom
  • Designed for writing new Vitest tests, debugging flaky or slow suites, reviewing PRs, and migrating from Jest

Install

$ npx -y skills add pproenca/dot-skills --skill vitest -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

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

PriorityCategoryImpactPrefix
1Async PatternsCRITICALasync-
2Test Setup & IsolationCRITICALsetup-
3Mocking PatternsHIGHmock-
4PerformanceHIGHperf-
5Snapshot TestingMEDIUMsnap-
6EnvironmentMEDIUMenv-
7AssertionsLOW-MEDIUMassert-
8Test OrganizationLOWorg-

Quick Reference

1. Async Patterns (CRITICAL)

Details

Repository
github.com/pproenca/dot-skills
Categories
Testing & QA, Frontend & UI Code
First seen
May 16, 2026

More from pproenca/dot-skills

All 100

Similar to Vitest

More Testing & QA