Use when writing unit/integration tests for Vite projects - configure vitest.config.ts, write test suites with describe/it, create mock implementations with vi.fn and vi.mock, set up code coverage thresholds, and run tests in parallel
Instalación
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Use when writing unit/integration tests for Vite projects - configure vitest.config.ts, write test suites with describe/it, create mock implementations with vi.fn and vi.mock, set up code coverage thresholds, and run tests in parallel
license
MIT
Vitest
Vite-native testing framework with Jest-compatible API.
When to Use
Writing unit/integration tests for Vite projects
Testing Vue/React/Svelte components
Mocking modules, timers, or dates
Running concurrent/parallel tests
Type testing with TypeScript
Quick Start
npm i -D vitest
// vitest.config.tsimport { defineConfig } from'vitest/config';
exportdefaultdefineConfig({
test: {
globals: true,
environment: 'node', // or 'jsdom' for DOM tests
},
});