.claude/skills/vitest/SKILL.md
Use when writing unit/integration tests for Vite projects - provides Vitest configuration, test APIs, mocking patterns, and coverage setup
npx skillsauth add 9aia/pachira vitestInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Vite-native testing framework with Jest-compatible API.
npm i -D vitest
// vitest.config.ts
import { defineConfig } from 'vitest/config'
export default defineConfig({
test: {
globals: true,
environment: 'node', // or 'jsdom' for DOM tests
},
})
// example.test.ts
import { describe, expect, it, vi } from 'vitest'
describe('math', () => {
it('adds numbers', () => {
expect(1 + 1).toBe(2)
})
})
| Task | File | | ---------------------------------------- | --------------------------------------- | | Configuration, CLI, projects | config.md | | test/describe, hooks, fixtures | test-api.md | | vi.fn, vi.mock, timers, spies | mocking.md | | expect, snapshots, coverage, filtering | utilities.md | | Environments, type testing, browser mode | advanced.md |
Consider loading these reference files based on your task:
DO NOT load all files at once. Load only what's relevant to your current task.
vue skill for component patternsts-library skill for library patternsvite skill for shared configdevelopment
Use when working with VueUse composables - provides reactive utilities for state, browser APIs, sensors, network, animations. Check VueUse before writing custom composables - most patterns already implemented.
development
Use when editing .vue files, creating Vue 3 components, writing composables, or testing Vue code - provides Composition API patterns, props/emits best practices, VueUse integration, and reactive destructuring guidance
tools
Vite build tool configuration, plugin API, SSR, and Vite 8 Rolldown migration. Use when working with Vite projects, vite.config.ts, Vite plugins, or building libraries/SSR apps with Vite.
development
Use when building with Reka UI (headless Vue components) - provides component API, accessibility patterns, composition (asChild), controlled/uncontrolled state, virtualization, and styling integration. Formerly Radix Vue.