vitest
Installation
SKILL.md
Vitest
Vitest is a next-generation testing framework powered by Vite. It uses the same configuration (vite.config.ts), transforms, and plugins as your app, making it incredibly fast and creating a unified dev/test environment.
When to Use
- Vite Projects: If you use Vite, Vitest is the no-brainer choice. It reuses your plugins/config.
- Performance: It is significantly faster than Jest because it uses native ESM and doesn't bundle the app.
- Watch Mode: Instant HMR-style updates for tests.
Quick Start
// vite.config.ts
/// <reference types="vitest" />
import { defineConfig } from "vite";