Download for MacApple silicon, macOS 14+
Skill

vitest

@antfu Updated 2026-10-23

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.

agent-skillsskills

Install

With your agent

Install OMGSkills skill "antfu/skills:vitest" into this agent's normal skills directory: call the OMGSkills MCP get_install_plan tool for your agent and run the script it returns (it installs only the pinned commit and verifies SKILL.md), and stop if MCP or the pin is unavailable. Do not overwrite or change existing skills without asking me.

Manual command

git clone https://github.com/antfu/skills /tmp/skills && ln -s /tmp/skills/skills/vitest ~/.claude/skills/vitest

From README

Core | Topic | Description | Reference | |-------|-------------|-----------| | Configuration | Vitest and Vite config integration, defineConfig | 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 | | | Test Context | Test fixtures, context.expect, test.extend for custom fixtures |...