vitest

작성자: antfu

Vite 기반의 Jest 호환 API를 갖춘 빠른 단위 테스트 프레임워크입니다. 테스트 작성, 모킹, 커버리지 설정, 테스트 필터링 및 픽스처 작업 시 사용하세요.

npx skills add https://github.com/antfu/skills --skill vitest

Vitest 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 5.0.1, generated at 2026-09-25.

Core

TopicDescriptionReference
ConfigurationVitest and Vite config integration, defineConfig usagecore-config
CLICommand line interface, commands and optionscore-cli
Test APItest/it function, modifiers like skip, only, concurrentcore-test-api
Describe APIdescribe/suite for grouping tests and nested suitescore-describe
Expect APIAssertions with toBe, toEqual, matchers and asymmetric matcherscore-expect
HooksbeforeEach, afterEach, beforeAll, afterAll, aroundEachcore-hooks

Features

TopicDescriptionReference
MockingMock functions, modules, timers, dates with vi utilitiesfeatures-mocking
SnapshotsSnapshot testing with toMatchSnapshot and inline snapshotsfeatures-snapshots
CoverageCode coverage with V8 or Istanbul providersfeatures-coverage
Test ContextTest fixtures, context.expect, test.extend for custom fixturesfeatures-context
ConcurrencyConcurrent tests, parallel execution, shardingfeatures-concurrency
FilteringFilter tests by name, file patterns, tagsfeatures-filtering
Test TagsLabel tests with tags to filter runs and apply shared optionsfeatures-test-tags
ReportersBuilt-in reporters, default selection, CI/output configfeatures-reporters
BenchmarkingWrite benchmarks with the bench fixture (Tinybench)features-benchmarking

Advanced

TopicDescriptionReference
Vi Utilitiesvi helper: mock, spyOn, fake timers, hoisted, waitForadvanced-vi
EnvironmentsTest environments: node, jsdom, happy-dom, customadvanced-environments
Type TestingType-level testing with expectTypeOf and assertTypeadvanced-type-testing
ProjectsMulti-project workspaces, different configs per projectadvanced-projects

관련 스킬

managing-astro-deployments
astronomer
Astronomer 프로덕션 배포를 Astro CLI로 관리합니다. 사용자가 인증, 작업 공간 전환, 배포 생성/업데이트/삭제 등을 원할 때 사용하세요.
add-app-clip
expo
iOS App Clip 타겟을 Expo 앱에 추가합니다. 사용자가 App Clip, AASA, apple-app-site-association, appclips, 스마트 앱 배너를 언급하거나 출시를 원할 때 사용하세요.
posthog-debugger
posthog
모든 웹사이트에서 PostHog 구현을 디버깅하고 검사합니다. 사용자가 페이지에서 PostHog가 어떻게 구현되었는지 이해하거나 문제를 해결하려 할 때 이 스킬을 사용하세요.
accessibility
microsoft
VS Code의 주요 접근성 스킬입니다. 새로운 기능 및 기여 작업에 필수이며, 기존 UI 업데이트에도 적용됩니다. 접근성 도움말을 다룹니다…
pinecone-rag
github
프로덕션 RAG 파이프라인과 지속형 에이전트 메모리를 Pinecone을 벡터 데이터베이스 백엔드로 사용하여 구축합니다. 사용자가 언급할 때 항상 이 스킬을 사용하세요…
dart-style
contentstack
이 Dart 저장소에서 패키지 레이아웃, 임포트, 네이밍, 그리고 analyzer/linter 정렬에 사용합니다.
getting-started
facebook
SDK 설정, Swift Package Manager 통합, Info.plist 구성, 그리고 Meta 글래스에 대한 첫 연결
box-legal-workflows-contract
box
Box MCP를 사용하여 계약 검토 및 모니터링을 자동화하세요 — 신규 또는 만료 예정 계약을 찾고, 이를 회사 템플릿과 비교하여 중요한 차이점을 식별하며, 작성…