vitest
작성자: antfu
Vitest fast unit testing framework powered by Vite with Jest-compatible API. Use when writing tests, mocking, configuring coverage, or working with test filtering and fixtures.
npx skills add https://github.com/antfu/skills --skill vitestVitest is a next-generation testing framework powered by Vite. It provides a Jest-compatible API with native ESM, TypeScript, and JSX support out of the box. Vitest shares the same config, transformers, resolvers, and plugins with your Vite app.
Key Features:
- Vite-native: Uses Vite's transformation pipeline for fast HMR-like test updates
- Jest-compatible: Drop-in replacement for most Jest test suites
- Smart watch mode: Only reruns affected tests based on module graph
- Native ESM, TypeScript, JSX support without configuration
- Multi-threaded workers for parallel test execution
- Built-in coverage via V8 or Istanbul
- Snapshot testing, mocking, and spy utilities
The skill is based on Vitest 3.x, generated at 2026-01-28.
Core
| Topic | Description | Reference |
|---|---|---|
| Configuration | Vitest and Vite config integration, defineConfig usage | core-config |
| CLI | Command line interface, commands and options | core-cli |
| Test API | test/it function, modifiers like skip, only, concurrent | core-test-api |
| Describe API | describe/suite for grouping tests and nested suites | core-describe |
| Expect API | Assertions with toBe, toEqual, matchers and asymmetric matchers | core-expect |
| Hooks | beforeEach, afterEach, beforeAll, afterAll, aroundEach | core-hooks |
Features
| Topic | Description | Reference |
|---|---|---|
| Mocking | Mock functions, modules, timers, dates with vi utilities | features-mocking |
| Snapshots | Snapshot testing with toMatchSnapshot and inline snapshots | features-snapshots |
| Coverage | Code coverage with V8 or Istanbul providers | features-coverage |
| Test Context | Test fixtures, context.expect, test.extend for custom fixtures | features-context |
| Concurrency | Concurrent tests, parallel execution, sharding | features-concurrency |
| Filtering | Filter tests by name, file patterns, tags | features-filtering |
Advanced
| Topic | Description | Reference |
|---|---|---|
| Vi Utilities | vi helper: mock, spyOn, fake timers, hoisted, waitFor | advanced-vi |
| Environments | Test environments: node, jsdom, happy-dom, custom | advanced-environments |
| Type Testing | Type-level testing with expectTypeOf and assertType | advanced-type-testing |
| Projects | Multi-project workspaces, different configs per project | advanced-projects |
관련 스킬
logging-best-practices
neondatabase
강력한 디버깅과 분석을 위한 광범위한 이벤트(표준 로그 라인)에 초점을 맞춘 로깅 모범 사례
official
azure-ai-projects-ts
microsoft
Build AI applications using Azure AI Projects SDK for JavaScript (@azure/ai-projects). Use when working with Foundry project clients, agents, connections,…
official
Effective Go
openshift
Apply Go best practices, idioms, and conventions from golang.org/doc/effective_go. Use when writing, reviewing, or refactoring Go code to ensure idiomatic,…
official
winapp-troubleshoot
microsoft
일반적인 Windows 앱 패키징, 서명, ID 및 SDK 오류를 진단하고 수정합니다. MSIX 패키징, 인증서 서명 등에서 오류가 발생할 때 사용하세요.
official
mcp-audit
sentry
Audit MCP servers for protocol compliance, metadata drift, and compatibility regressions. Use when reviewing tool annotations, tool/result schemas, structured…
official
env-vars
vercel
Vercel 환경 변수 전문가 가이드입니다. .env 파일, vercel env 명령어, OIDC 토큰을 사용하거나 환경별 구성을 관리할 때 사용하세요.
official
wix-cli-dashboard-page
wix
관리자 인터페이스, 관리 페이지, CRUD 작업 또는 대시보드 구성 UI를 구축할 때 사용합니다. 트리거에는 대시보드, 관리자 패널, 데이터 등이 포함됩니다.
official
azure-ai-vision-imageanalysis-java
microsoft
Azure AI Vision SDK for Java를 사용하여 이미지 분석 애플리케이션을 구축합니다. 이미지 캡션 생성, OCR 텍스트 추출, 객체 감지, 태깅 등을 구현할 때 사용합니다.
official