
vitest
β 5,500by antfu Β· part of antfu/skills
Vitest fast unit testing framework powered by Vite with Jest-compatible API. Use when writing tests, mocking, configuring coverage, or working with test filtering and fixtures.
Vitest fast unit testing framework powered by Vite with Jest-compatible API. Use when writing tests, mocking, configuring coverage, or working with test filtering and fixtures.
Inspect the full instructions your agent will receiveExpandCollapse
This is the exact playbook injected into your agent when the skill activates β shown here so you can audit it before installing. You don't need to read it to use the skill.
by antfu
Vitest fast unit testing framework powered by Vite with Jest-compatible API. Use when writing tests, mocking, configuring coverage, or working with test filtering and fixtures.
npx skills add https://github.com/antfu/skills --skill vitest
Download ZIPGitHub5.5k
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.x (beta), generated at 2026-06-22.
Core
Topic Description Reference Configuration Vitest and Vite config integration, defineConfig usage core-config CLI Command line interface, commands and options core-cli Test API test/it function, modifiers like skip, only, concurrent core-test-api Describe API describe/suite for grouping tests and nested suites core-describe Expect API Assertions with toBe, toEqual, matchers and asymmetric matchers core-expect Hooks beforeEach, afterEach, beforeAll, afterAll, aroundEach core-hooks
Features
Topic Description Reference Mocking Mock functions, modules, timers, dates with vi utilities features-mocking Snapshots Snapshot testing with toMatchSnapshot and inline snapshots features-snapshots Coverage Code coverage with V8 or Istanbul providers features-coverage Test Context Test fixtures, context.expect, test.extend for custom fixtures features-context Concurrency Concurrent tests, parallel execution, sharding features-concurrency Filtering Filter tests by name, file patterns, tags features-filtering Test Tags Label tests with tags to filter runs and apply shared options features-test-tags Reporters Built-in reporters, default selection, CI/output config features-reporters Benchmarking Write benchmarks with the bench fixture (Tinybench) features-benchmarking
Advanced
Topic Description Reference Vi Utilities vi helper: mock, spyOn, fake timers, hoisted, waitFor advanced-vi Environments Test environments: node, jsdom, happy-dom, custom advanced-environments Type Testing Type-level testing with expectTypeOf and assertType advanced-type-testing Projects Multi-project workspaces, different configs per project advanced-projects
Related Skills
azure-hosted-copilot-sdk Azure
Build and deploy GitHub Copilot SDK apps to Azure.
vendor-management anthropic
Evaluate, compare, and manage vendor relationships. Trigger with "evaluate this vendor", "compare vendors", "vendor review", "should we renew", "RFP", or when⦠official
working-with-dbt-mesh dbt-labs
Implements dbt Mesh governance features (model contracts, access modifiers, groups, versioning) and multi-project collaboration with cross-project refs. Use⦠official
upstash-workflow-js upstash
Lightweight guidance for using the Upstash Workflow SDK to define, trigger, and manage workflows. Use this Skill whenever a user wants to create workflow⦠official
run-acceptance-tests hashicorp
Guide for running acceptance tests for a Terraform provider. Use this when asked to run an acceptance test or to run a test with the prefix TestAcc.
official
Playwright Skill lackeyjb
Enables Claude to write and execute any Playwright automation on-the-fly - from simple page tests to complex multi-step flows. development
firecrawl-parse firecrawl
Turn a local document into clean markdown on disk. Supports PDF, DOCX, DOC, ODT, RTF, XLSX, XLS, HTML/HTM/XHTML . official
skypilot-multi-cloud-orchestration firecrawl
Multi-cloud orchestration for ML workloads with automatic cost optimization. Use when you need to run training or batch jobs across multiple clouds, leverage⦠official
npx skills add https://github.com/antfu/skills --skill vitestRun this in your project β your agent picks the skill up automatically.
No common issues documented yet. If you hit a problem, the repository's GitHub Issues page is the best place to look.