vitest

Skill

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.

Files21
  • @skills/vitest/GENERATION.md
  • @skills/vitest/SKILL.md
  • @skills/vitest/references/advanced-environments.md
  • @skills/vitest/references/advanced-projects.md
  • @skills/vitest/references/advanced-type-testing.md
  • @skills/vitest/references/advanced-vi.md
  • @skills/vitest/references/core-cli.md
  • @skills/vitest/references/core-config.md
  • @skills/vitest/references/core-describe.md
  • @skills/vitest/references/core-expect.md
  • @skills/vitest/references/core-hooks.md
  • @skills/vitest/references/core-test-api.md
  • @skills/vitest/references/features-benchmarking.md
  • @skills/vitest/references/features-concurrency.md
  • @skills/vitest/references/features-context.md
  • @skills/vitest/references/features-coverage.md
  • @skills/vitest/references/features-filtering.md
  • @skills/vitest/references/features-mocking.md
  • @skills/vitest/references/features-reporters.md
  • @skills/vitest/references/features-snapshots.md
  • @skills/vitest/references/features-test-tags.md
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

TopicDescriptionReference
ConfigurationVitest and Vite config integration, defineConfig usagecore-config [blocked]
CLICommand line interface, commands and optionscore-cli [blocked]
Test APItest/it function, modifiers like skip, only, concurrentcore-test-api [blocked]
Describe APIdescribe/suite for grouping tests and nested suitescore-describe [blocked]
Expect APIAssertions with toBe, toEqual, matchers and asymmetric matcherscore-expect [blocked]
HooksbeforeEach, afterEach, beforeAll, afterAll, aroundEachcore-hooks [blocked]

Features

TopicDescriptionReference
MockingMock functions, modules, timers, dates with vi utilitiesfeatures-mocking [blocked]
SnapshotsSnapshot testing with toMatchSnapshot and inline snapshotsfeatures-snapshots [blocked]
CoverageCode coverage with V8 or Istanbul providersfeatures-coverage [blocked]
Test ContextTest fixtures, context.expect, test.extend for custom fixturesfeatures-context [blocked]
ConcurrencyConcurrent tests, parallel execution, shardingfeatures-concurrency [blocked]
FilteringFilter tests by name, file patterns, tagsfeatures-filtering [blocked]
Test TagsLabel tests with tags to filter runs and apply shared optionsfeatures-test-tags [blocked]
ReportersBuilt-in reporters, default selection, CI/output configfeatures-reporters [blocked]
BenchmarkingWrite benchmarks with the bench fixture (Tinybench)features-benchmarking [blocked]

Advanced

TopicDescriptionReference
Vi Utilitiesvi helper: mock, spyOn, fake timers, hoisted, waitForadvanced-vi [blocked]
EnvironmentsTest environments: node, jsdom, happy-dom, customadvanced-environments [blocked]
Type TestingType-level testing with expectTypeOf and assertTypeadvanced-type-testing [blocked]
ProjectsMulti-project workspaces, different configs per projectadvanced-projects [blocked]
vitest — Kortix Marketplace | Kortix