# vitest

> Claude/Codex skill by [@antfu](https://omgskills.com/library/antfu/index.md) · 6k stars · 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.

Tags: agent-skills, skills

## Install

```sh
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 |...

## Links

- HTML page: https://omgskills.com/library/antfu/skills/vitest/
- GitHub: https://github.com/antfu/skills
- Author: [@antfu](https://omgskills.com/library/antfu/index.md)

## More from this repo

- [nuxt](https://omgskills.com/library/antfu/skills/nuxt/index.md) — Nuxt full-stack Vue framework with SSR, auto-imports, and file-based routing.
   - [@antfu](https://omgskills.com/library/antfu/index.md) · 6.1k stars
- [antfu](https://omgskills.com/library/antfu/skills/skills/antfu/index.md) — Anthony Fu's opinionated tooling and conventions for JavaScript/TypeScript projects.
   - [@antfu](https://omgskills.com/library/antfu/index.md) · 6k stars
- [nitro](https://omgskills.com/library/antfu/skills/skills/nitro/index.md) — Nitro is the framework-agnostic server toolkit (powering Nuxt) for building and deploying web servers anywhere.
   - [@antfu](https://omgskills.com/library/antfu/index.md) · 6k stars
