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 3.x, generated at 2026-01-28.

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

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

swiftui-performance-audit
openai
Audit and improve SwiftUI runtime performance from code review and architecture. Use for requests to diagnose slow rendering, janky scrolling, high CPU/memory…
official
box
box
Build and troubleshoot Box integrations for uploads, folders, folder listings, downloads and previews, shared links, collaborations, search, metadata,…
official
debug
anthropic
Structured debugging session — reproduce, isolate, diagnose, and fix. Trigger with an error message or stack trace, "this works in staging but not prod",…
official
integration-android
posthog
PostHog integration for Android applications
official
flutter-concurrency
flutter
Background JSON parsing and state management for jank-free Flutter UI rendering. Provides decision tree for choosing between manual serialization ( dart:convert ) and code generation ( json_serializable ) based on model complexity Supports three concurrency strategies: main-thread async/await for small payloads, short-lived Isolate.run() for heavy one-off computations, and long-lived isolates with ReceivePort / SendPort for continuous two-way communication Includes platform-aware fallback:...
official
kling-3-0
runcomfy-com
Kling 3.0 Videogenerierung auf RunComfy. Kling 3.0 (auch Kling V3.0 genannt) ist das Multi-Shot-Videomodell der dritten Generation von Kuaishou Technology mit nativem synchronisiertem Audio und konsistenter Charakteridentität über mehrere Aufnahmen hinweg. Diese Fähigkeit deckt alle sechs Kling 3.0-Endpunkte ab, die drei Rendering-Stufen (Standard, Pro, 4K) und zwei Modi (Text-zu-Video, Bild-zu-Video) umfassen. Aufrufe erfolgen über runcomfy run kling/kling-3.0/ / über die lokale RunComfy-CLI. Auslöser sind "kling", "kling 3.0", "kling v3", "kling pro",...
videocreativemedia
firebase-hosting-basics
firebase
Deploy static sites, SPAs, and microservices to a global CDN with zero-config SSL. Supports static sites, single-page apps (React, Vue, etc.), and dynamic content via Cloud Functions or Cloud Run integration Includes preview channels for testing changes on temporary URLs before live deployment, with GitHub Actions automation Configure routing, redirects, rewrites, and headers via firebase.json ; emulate locally at http://localhost:5000 before deploying Not intended for full-stack frameworks...
official
3-statements
anthropic
Complete, populate and fill out 3-statement financial model templates (Income Statement, Balance Sheet, Cash Flow Statement) . Use when asked to fill out model…
official