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
},
});