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.1.0-beta.1, generated at 2026-10-23.

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

관련 스킬

expo-upgrade
expo
프레임워크(OSS). Expo SDK 버전 업그레이드 및 의존성 문제 해결을 위한 가이드라인
apidevelopmenttesting
ui-sdk
vercel
React, Vue, Svelte, Solid 또는 웹 컴포넌트에서 ui-sdk로 인터페이스를 구축합니다. ui-sdk 컴포넌트를 선택하고 조합하는 방법, @ui-sdk/core에 포함되지 않은 컴포넌트나 동작(예: 스테퍼, 스플리터, 전송 목록 또는 이모지 선택기)을 만드는 방법, createAgent, 에이전트 도구 및 WebMCP를 통해 에이전트가 인터페이스를 사용할 수 있게 하는 방법, 키보드, 포커스, ARIA, 서버 렌더링 및 오른쪽에서 왼쪽으로 쓰는 언어를 테스트하는 방법을 다룹니다. 기존 컴포넌트의 테스트 작성도 포함합니다. 프로젝트에 @ui-sdk/*가 있으면 사용하세요...
testingdesigndevelopment
workers-development
cloudflare
로컬 개발 중 cf dev, wrangler dev 또는 Cloudflare Vite 플러그인을 사용해 Cloudflare Workers를 실행하고, 검사하고, 디버깅합니다. Local Explorer를 사용해 바인딩 데이터를 읽고 시드하며 로컬 트레이스와 로그를 쿼리합니다. 프로덕션 디버깅도 Workers observability로 연결합니다. 프로젝트에서 Wrangler를 사용하는지 여부와 관계없이 요청을 디버깅할 때 사용합니다.
devopstestingdevelopment
workers-profiling
cloudflare
배포된 Cloudflare Workers와 Durable Objects의 CPU 사용량과 메모리 할당을 프로파일링하거나 디버깅하세요. 그런 다음 이 정보를 활용해 코드를 최적화하세요.
devopstestingdevelopment
accessibility
addyosmani
WCAG 2.2 지침에 따라 웹 접근성을 감사하고 개선합니다. "접근성 개선", "a11y 감사", "WCAG 준수", "스크린 리더 지원", "키보드 탐색", "접근 가능하게 만들기"와 같은 요청이 있을 때 사용하세요.
developmenttestingcode-review
accessibility-engineering
addyosmani
기존 인터페이스의 WCAG 2.2 AA 준수 여부를 감사하고 발견된 위반 사항을 수정합니다. 페이지나 컴포넌트의 접근성을 감사하거나, axe-core 또는 pa11y를 실행하거나, a11y 위반 사항의 우선순위를 정하거나, 출시 전에 스크린 리더 및 대비 문제를 확인할 때 사용하세요.
developmenttestingdesign
audit-website
squirrelscan
squirrelscan CLI로 웹사이트를 감사하고 발견된 문제를 코드에서 수정합니다. SEO, 성능, 보안, 기술, 콘텐츠, 접근성 및 15개 기타 규칙 카테고리(249개 이상의 규칙)를 실행하고, LLM에 최적화된 보고서를 반환한 후, 반복 수정 루프를 통해 문제를 소스 파일에 매핑하고, 수정 사항을 적용하며, 사이트 점수가 양호해질 때까지 재감사합니다. 웹사이트나 웹앱의 문제를 발견 및 평가하고, 이를 해결 상태로 이끄는 데 사용합니다.
developmenttestingweb-scraping
better-accessibility
jakubkrehel
WCAG 2.2 기준에 따라 키보드 및 포커스 동작, ARIA, 접근 가능한 이름, 양식, 스크린 리더 알림, 모션 및 확대/축소를 검토하고 수정합니다.
developmenttestingcode-review