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

Skills relacionadas

tao-train-segformer
nvidia
SegFormer para segmentación semántica. Arquitectura ligera basada en transformers con extracción jerárquica de características, eficiente para segmentación en tiempo real…
official
island-rescue
vercel
Cómo ser rescatado de una isla solitaria
official
channel-digest
microsoft
Resumir la actividad en varios canales de Teams en un único resumen consolidado: discusiones clave, decisiones, menciones y elementos de acción.
official
github-labels-query
github
Lista las etiquetas de un repositorio de GitHub con soporte de paginación por per_page.
official
validate-and-fix
openshift
Ejecuta el pipeline completo de validación (make test-unit, make verify, make test-integration) y corrige automáticamente fallos triviales como formato black, importaciones no utilizadas, y…
official
signals-scout-observability-gaps
posthog
Explorador de señales enfocado en encontrar brechas de observabilidad en el propio PostHog: volúmenes de eventos significativos que el equipo no está rastreando, eventos personalizados sin información o…
official
linkedin-post-formatter
github
Formatea y redacta publicaciones atractivas para LinkedIn usando estilos Unicode en negrita/cursiva, separadores visuales, secciones estructuradas y patrones optimizados para el compromiso. USA…
official
claude-automation-recommender
anthropic
Analiza bases de código y recomienda automatizaciones personalizadas de Claude Code en todas las opciones de extensibilidad. Escanea la estructura del proyecto, dependencias y configuración para identificar las automatizaciones más valiosas para hooks, subagentes, habilidades, plugins y servidores MCP. Proporciona 1 o 2 recomendaciones enfocadas por categoría con razonamiento específico vinculado a los frameworks, bibliotecas y patrones detectados. Análisis de solo lectura; genera recomendaciones para que los usuarios las implementen por sí mismos o soliciten a Claude que las construya. Cubre MCP...
official