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

関連スキル

kj-style
cloudflare
KJ/workerd C++コードレビューのためのスタイルガイドライン。命名、型の使用法、メモリ管理、エラー処理、継承、const性、フォーマットなどをカバー…
openai-image-gen
deepgram
Batch-generate images via OpenAI Images API. Random prompt sampler + `index.html` gallery.
azure-ai-projects-dotnet
microsoft
.NET向けAzure AI Projects SDK。Azure AI Foundryプロジェクトのための高レベルクライアントで、エージェント、接続、データセット、デプロイメント、評価、インデックスを含みます。AI Foundryプロジェクト管理、バージョン管理されたエージェント、オーケストレーションに使用します。トリガー:「AI Projects」「AIProjectClient」「Foundryプロジェクト」「バージョン管理されたエージェント」「評価」「データセット」「接続」「デプロイメント .NET」。
development
Firecrawl - Web Scraping and Searching
firecrawl
firecrawl---web-scraping-and-searching — AIエージェント用のインストール可能なスキルで、firecrawl/cliによって公開されています。
doca-common
nvidia
ユーザーがBlueField DPUまたはConnectX NIC上で実践的なDOCAプログラミングを行っており、各ライブラリに共通する基礎プリミティブを必要とする場合に、このスキルを使用してください。
api-docs
langchain-ai
OpenAPIドキュメントとREST APIデザインパターン
notion-knowledge-capture
notion
会話や議論をNotionの構造化されたドキュメントページに変換します。チャットのコンテキストから洞察、決定事項、知識を取得し、フォーマット…
mongosh-release-notes
mongodb
新しいバージョンのMongoDB Shell(mongosh)リリースノートの下書きを、mongodb-js/mongoshから対応するリリースを取得し、ドキュメント用に整形して作成します。…