
vitest
Vitest 5 (Vite ネイティブテストフレームワーク) リファレンス。 test, describe, it, expect, vi.fn, vi.mock, vi.spyOn, vi.when、 beforeEach / afterEach、test.extend fixtures、test tags / annotations、 coverage (v8 / istanbul)、snapshot、vitest.config.ts、projects (old workspace)、 Vitest Browser Mode (vitest-browser-react, locators, expect.element)、UI モード、bench fixture。
- Installs
- 93
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/fandhe-ai/agent-reference-skills --skill vitest- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads vitest automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
Vitest API リファレンス
Vitest — Vite ネイティブのテストフレームワーク。 テスト作成・レビュー・リファクタリング時に参照する。
Target: Vitest v5.0.5 (vitest-dev/vitest tag v5.0.5; Node ^22.12.0 / ^24 / >=26, Vite ^6.4 / ^7 / ^8 as a peer dependency)
ディレクトリ構成
skills/vitest/
SKILL.md
references/
api/
README.md
test-api.md
expect.md
vi.md
hooks.md
guide/
README.md
benchmarking.md
cli.md
common-errors.md
config.md
coverage.md
debugging.md
environment.md
extending-matchers.md
filtering.md
improving-performance.md
in-source.md
lifecycle.md
migration-jest.md
migration-mocha.md
migration-v5.md
open-telemetry.md
parallelism.md
profiling-test-performance.md
snapshot.md
test-annotations.md
test-context.md
test-tags.md
testing-types.md
ui.md
workspace.md
patterns/
README.md
async.md
mocking.md
mocking-classes.md
mocking-dates.md
mocking-file-system.md
mocking-globals.md
mocking-requests.md
browser-mode/
README.md
overview.md
why.md
multiple-setups.md
browser-config.md
locators.md
interactivity-api.md
assertions.md
commands.md
context-api.md
render-function.md
component-testing.md
visual-regression-testing.md
aria-snapshots.md
trace-view.md
playwright-traces.md
recipes/
README.md
browser-locators.md
cancellable.md
conditional-mocking.md
custom-assertions.md
db-transaction.md
disable-isolation.md
explicit-resources.md
parallel-sequential.md
schema-matching.md
type-narrowing.md
wait-for.md
watch-templates.md
advanced/
README.md
getting-started.md
running-tests.md
extending-reporters.md
custom-pool.md
benchmark-provider.md
samples/
README.md
basic-test.md
benchmark-fixture.md
browser-component-test.md
conditional-mocking-vi-when.md
coverage-setup.md
describe-and-hooks.md
mocking-modules.md
parameterized-tests.md
snapshot-testing.md
spy-on-methods.md
test-environment.md
type-testing.md
workspace-setup.md
scripts/
README.md
cli.md
coverage.md
install.md
setup.md
探索手順
タスクからカテゴリを引き、カテゴリの README.md で目的のページを特定する:
- 下記マッピング表でタスクに対応するカテゴリを探す
- そのカテゴリの
references/{category}/README.mdを参照して目的のページを特定する - 該当ページの
.mdを Read して詳細を確認する
タスク → カテゴリ マッピング
| タスク | カテゴリ | 参照 README |
|---|---|---|
| describe, it/test, hooks (aroundEach / onTestFinished), modifiers, each/for を使いたい | api | references/api/README.md |
| expect のマッチャー(等値・型・数値・コレクション・スナップショット・非同期)を調べたい | api | references/api/README.md |
| vi.fn, vi.mock, vi.spyOn, タイマー, スタブを使いたい | api | references/api/README.md |
| vitest.config.ts の設定オプションを調べたい | guide | references/guide/README.md |
| CLI コマンド・フラグを調べたい(リファレンス) | guide | references/guide/README.md |
| カバレッジ (v8 / istanbul) を設定したい | guide | references/guide/README.md |
| テスト環境 (jsdom, happy-dom, edge-runtime) を切り替えたい | guide | references/guide/README.md |
| スナップショットテスト・型テスト・projects (旧 workspace) を設定したい | guide | references/guide/README.md |
| Test Context / fixtures・tags・annotations・filtering・lifecycle を知りたい | guide | references/guide/README.md |
| カスタムマッチャー・reporters・UI・debugging・in-source testing を使いたい | guide | references/guide/README.md |
| パフォーマンス改善・プロファイリング・並列実行・OpenTelemetry・benchmarking を調べたい | guide | references/guide/README.md |
| よくあるエラーの原因と対処を知りたい | guide | references/guide/README.md |
| v4 → v5 / Jest / Mocha からの移行手順を知りたい | guide | references/guide/README.md |
| モックパターン (vi.fn, vi.mock, vi.spyOn, 部分モック) を知りたい | patterns | references/patterns/README.md |
| 日付・グローバル・ファイルシステム・HTTP リクエスト・クラスを詳細にモックしたい | patterns | references/patterns/README.md |
| 非同期テスト・フェイクタイマーのパターンを知りたい | patterns | references/patterns/README.md |
| Browser Mode (locators, interactivity, expect.element, component testing) を使いたい | browser-mode | references/browser-mode/README.md |
| Browser Mode の visual regression・trace view・browser 設定を調べたい | browser-mode | references/browser-mode/README.md |
| 実践レシピ (DB transaction, vi.when, using, wait-for, isolation) を知りたい | recipes | references/recipes/README.md |
| プログラマティック API・カスタム reporter・カスタム pool・benchmark provider を実装したい | advanced | references/advanced/README.md |
| 典型的な使い方・実例を参照したい | samples | samples/README.md |
| インストール・CLI コマンド・セットアップ手順を知りたい | scripts | scripts/README.md |
FAQ
What does the vitest skill do?
Vitest 5 (Vite ネイティブテストフレームワーク) リファレンス。 test, describe, it, expect, vi.fn, vi.mock, vi.spyOn, vi.when、 beforeEach / afterEach、test.extend fixtures、test tags / annotations、 coverage (v8 / istanbul)、snapshot、vitest.config.ts、projects (old workspace)、 Vitest Browser Mode (vitest-browser-react, locators, expect.element)、UI モード、bench fixture。
How do I install vitest?
Run npx skills add https://github.com/fandhe-ai/agent-reference-skills --skill vitest in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/vitest/ (personal) or .claude/skills/vitest/ (project).
Which AI agents can use vitest?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is vitest safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains vitest?
It is published by fandhe-ai in fandhe-ai/agent-reference-skills. It has 93 recorded installs.
More from fandhe-ai/agent-reference-skills
github-docs
fandhe-ai/agent-reference-skills
GitHub 公式ドキュメント (docs.github.com)。REST API, GraphQL, Webhooks, GitHub Apps, OAuth Apps, gh CLI, PAT / GITHUBTOKEN, Actions (jobs, steps, expressions, workflow commands, concurrency, OIDC, artifact attestations, lockfile), pull requests, issues, Projects v2, immutable releases, Codespaces, Packages, Copilot API / cloud agent, code scanning, secret scanning, Dependabot, Dependency graph / SBOM, Teams, Billing, activity (events / notifications)。
commitlint
fandhe-ai/agent-reference-skills
commitlint (Conventional Commits メッセージ検証ツール) リファレンス。 rules 設定、plugins、shareable-config、@commitlint/config-conventional、 Husky / lefthook / simple-git-hooks 連携、CI 統合、custom rules。
lefthook
fandhe-ai/agent-reference-skills
Lefthook (高速並列 Git hooks マネージャー) リファレンス。 lefthook.yml 設定、pre-commit / pre-push / commit-msg 等のフック、 parallel / piped 実行、glob / run / tags フィルタ、stagedfiles、 lefthook の ai 設定 (beta)、JSON schema、Composer / npm / pip 等インストール、 保護ブランチ、CI スキップ、Husky からの移行。
editorconfig
fandhe-ai/agent-reference-skills
EditorConfig (エディタ設定統一フォーマット) リファレンス。 .editorconfig ファイル、glob パターン、root、 indentstyle / indentsize / tabwidth、endofline, charset、 trimtrailingwhitespace, insertfinalnewline, maxlinelength, spellinglanguage。
rust
fandhe-ai/agent-reference-skills
Rust 言語リファレンス。 別名: rustlang, rs (拡張子)、Rust-lang。 TRPL (The Rust Programming Language)、Rust by Example、Reference、 Cargo Book、rustc Book、rustdoc Book、Rustonomicon (Unsafe Rust)、 Edition Guide、Standard Library、Error Index。 所有権、ライフタイム、トレイト、async / await、エラーハンドリング、マクロ。
anthropic-claude-code
fandhe-ai/agent-reference-skills
Claude Code (code.claude.com) の CLI 本体リファレンス。 CLAUDE.md memory, settings.json (All settings, settings precedence, managed-settings.json), env-vars, model config, keybindings, statusline, terminal config, cli-reference (-p / --continue / --resume), sessions, checkpointing, worktrees, remote control, channels, deep links, troubleshooting。
Popular testing & qa skills
tdd
mattpocock/skills
Test-driven development. Use when the user wants to build features or fix bugs test-first, mentions "red-green-refactor", or wants integration tests.
grilling
mattpocock/skills
Grill the user relentlessly about a plan, decision, or idea. Use when the user wants to stress-test their thinking, or uses any 'grill' trigger phrases.
migrate-to-shoehorn
mattpocock/skills
Migrate test files from as type assertions to @total-typescript/shoehorn. Use when user mentions shoehorn, wants to replace as in tests, or needs partial test data.
run-train
lllllllama/rigorpilot-skills
Rigor Train skill for deep learning research repositories. Use when a documented or selected training command should be run conservatively for startup verification, short-run verification, full kickoff, or resume, with command, config, seed, log, checkpoint, status, and metric evidence written to standardized trainoutputs/. Do not use for environment setup, exploratory sweeps, speculative idea implementation, or end-to-end orchestration.
test-driven-development
obra/superpowers
Use when implementing any feature or bugfix, before writing implementation code
finishing-a-development-branch
obra/superpowers
Use when implementation is complete, all tests pass, and you need to decide how to integrate the work