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
설치
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
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
},
});