vitest

von antfu

Schnelles Unit-Testing-Framework, unterstützt von Vite, mit Jest-kompatibler API. Verwenden beim Schreiben von Tests, Mocking, Konfigurieren der Abdeckung oder Arbeiten mit Testfiltern und Fixtures.

npx skills add https://github.com/antfu/skills --skill vitest

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
CLICommand line interface, commands and optionscore-cli
Test APItest/it function, modifiers like skip, only, concurrentcore-test-api
Describe APIdescribe/suite for grouping tests and nested suitescore-describe
Expect APIAssertions with toBe, toEqual, matchers and asymmetric matcherscore-expect
HooksbeforeEach, afterEach, beforeAll, afterAll, aroundEachcore-hooks

Features

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

Advanced

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

Verwandte Skills

neon-postgres-agent-platforms
neondatabase
Build and operate multi-tenant AI agent platforms on Neon. Use this skill whenever the user is designing an agent/app builder, provisioning a Neon project or…
official
dig
apify
Flexible Fähigkeit zum Erkunden, Planen und Spezifizieren von Arbeiten auf dem Apify MCP-Server. KEINE Quelldateien bearbeiten – diese Fähigkeit dient nur zum Verständnis und zur Planung.
official
webwright
microsoft
Löse eine benutzerspezifizierte Webaufgabe im Code-as-Action-Stil, indem du einen lokalen Playwright-Browser mit jeweils einem Bash-Befehl steuerst, Screenshots speicherst und eine Aktion…
official
convert-plaintext-to-md
github
Konvertiert Plain-Text-Dokumentation in Markdown mit flexiblen Formatierungsoptionen. Unterstützt drei Konvertierungsansätze: explizite Anweisungen, dokumentierte Optionen oder Referenzdateivorlagen für konsistente Formatierungsmuster. Enthält vordefinierte Anweisungsabkürzungen für häufige Aufgaben wie Entfernen von Kopfzeilenziffern, Anpassen von Überschriftsebenen und Reduzieren von Einrückungen. Behandelt Codeblock-Erkennung mit Sprachidentifikation, korrekte Listenschachtelung und Markdown-Syntax-Konformität über mehrere Ziel...
official
refining-android-requirements
bitwarden
Anforderungslückenanalyse und strukturierte Spezifikation für Bitwarden Android. Verwenden bei der Verfeinerung von Anforderungen, Analyse von Spezifikationen, Identifizierung von Lücken oder Erstellung von…
official
telemetry
openai
Add lightweight runtime telemetry and debug instrumentation to macOS apps, then verify those events after building and running. Use when wiring `Logger` /…
official
better-icons
better-auth
Durchsuche und rufe SVGs aus über 200 Icon-Bibliotheken ab, mit CLI- und MCP-Server-Integration. Unterstützt die Suche in großen Sammlungen (Lucide, Material Design Icons, Heroicons, Tabler und über 200 weitere) mit Filterung nach Präfix und Ergebnisbegrenzung. CLI-Befehle zum Suchen von Icons, Herunterladen von Batches als SVG-Dateien und Abrufen einzelner Icons mit Farb- und Größenanpassung. MCP-Server-Tools für KI-Agenten, einschließlich intelligenter Empfehlungen, Ähnlichkeitsabgleich, Projektscanning und Batch-Icons...
official
verification
openai
Full-Story-Verifikation — leitet ab, was der Benutzer erstellt, und verifiziert dann den vollständigen Ablauf End-to-End: Browser → API → Daten → Antwort. Wird auf dem Dev-Server ausgelöst…
official