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、またはWeb Componentsでui-sdkを使ったインターフェースを構築します。コンポーネントの選択と組み合わせ、@ui-sdk/coreに含まれていないコンポーネントや動作(ステッパー、スプリッター、転送リスト、絵文字ピッカーなど)の構築、createAgent、エージェントツール、WebMCPを通じてエージェントがインターフェースを利用できるようにする方法、キーボード操作、フォーカス、ARIA、サーバーレンダリング、右から左への表示のテストを扱います。既存のコンポーネントのテスト作成も対象です。プロジェクトに@ui-sdk/*がある場合はいつでも使用してください...
testingdesigndevelopment
workers-development
cloudflare
ローカル開発中に cf dev、wrangler dev、または Cloudflare Vite plugin を使って 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