vitest

por antfu

Marco de pruebas unitarias rápidas impulsado por Vite con API compatible con Jest. Úselo al escribir pruebas, simular, configurar cobertura o trabajar con filtrado de pruebas y 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.0.1, generated at 2026-09-25.

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

Skills relacionadas

shopify-onboarding-dev
shopify
Comienza a desarrollar en Shopify. Úsalo cuando un desarrollador pregunte cómo crear una aplicación, crear un tema, crear una tienda de desarrollo, configurar una cuenta de socio, iniciar un proyecto, o...
dignified-python
dagster-io
Estándares de codificación Python en producción con detección automática de versión (3.10-3.13). Úsalo al escribir, revisar o refactorizar Python para garantizar el cumplimiento de…
instance-storage-patterns
microsoft
Úselo cuando su sistema gestione múltiples instancias o sesiones concurrentes que necesiten directorios de almacenamiento aislados, bloqueo de archivos por instancia, o un…
repo-story-time
github
Generar un resumen completo del repositorio y una narrativa a partir del historial de commits
azure-mgmt-apimanagement-dotnet
microsoft
SDK de Azure Resource Manager para API Management en .NET. Úselo para operaciones del PLANO DE ADMINISTRACIÓN: creación/gestión de servicios APIM, APIs, productos, suscripciones, políticas, usuarios, grupos, puertas de enlace y backends a través de Azure Resource Manager. Disparadores: "API Management", "servicio APIM", "crear APIM", "gestionar APIs", "ApiManagementServiceResource", "políticas de API", "productos APIM", "suscripciones APIM".
development
amc-run-rtsp-calibration
nvidia
Calibrar un nuevo dataset desde transmisiones en vivo de cámaras RTSP a través de la API REST de AutoMagicCalib. Usar cuando el usuario proporciona URLs RTSP o solicita calibrar cámaras en vivo;…
whatsapp-delivery
vercel
Flujo de trabajo de especialista en canal de WhatsApp: depuración de verificación/firmas de webhook de Meta, proyección de estado de enlace, ruta rápida de /whatsapp-webhook, mensajes de arranque y…
holoscan-install-source
nvidia
Compilar Holoscan SDK desde el código fuente mediante el script ./run incluido en el árbol. Usar solo cuando los paquetes publicados no satisfagan las necesidades del usuario.