What problem does it solve?
Vitest testing is essential for fast feedback in Vite-powered projects. This Skill provides expert guidance to configure Vitest, migrate from Jest, enable browser-mode testing, and tune performance for large test suites.
Core Features & Use Cases
- Vite Integration & Configuration: optimal Vitest setup, pool tuning, transformation modes, and HMR integration for test development.
- Jest Migration & API Compatibility: strategies to translate mocks, timers, snapshots, and imports from Jest to Vitest.
- Browser Mode Testing: multi-browser testing with Playwright/WebDriver, framework integration, and browser-specific matchers.
- Performance Optimization: isolation/pool settings, dependency optimization, and memory usage strategies.
- Workspace & Monorepo Support: multi-project configurations and shared test tooling.
- Modern JavaScript & ESM: native ESM, import.meta.vitest, TypeScript integration.
Quick Start
Install Vitest and Vite in your project (npm i -D vitest vite). Create a vitest.config.ts with your test setup, then run tests with npx vitest run or npm exec vitest.