vitest

Marco de pruebas unitarias rápidas Vitest impulsado por Vite con API compatible con Jest. Úselo al escribir pruebas, simular, configurar cobertura o trabajar con pruebas...

npx skills add https://github.com/supabase/supabase --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

Más skills de supabase

studio-e2e-tests
supabase
Escribe y ejecuta pruebas E2E con Playwright para Supabase Studio. Úsalo cuando te lo pidan.
pm-the-docs
supabase
Soporte de decisiones de Docs-PM para el proceso de autoría de "Write the docs": toma decisiones sobre audiencia, etapa y alcance transversal durante las etapas de Frame y Shape,...
studio-best-practices
supabase
Prácticas recomendadas de React y TypeScript para Supabase Studio. Úsalo al escribir o revisar componentes de Studio: cubre la nomenclatura de booleanos, la estructura de componentes,…
docs-content
supabase
Redacta, edita, organiza y revisa contenido de Supabase en cualquier parte de apps/docs: guías, explicaciones, tutoriales, entradas de solución de problemas, documentos de referencia y…
studio-mock-api-tests
supabase
Pruebas de componentes para Supabase Studio que simulan solicitudes de API en la capa de red con MSW. Úsalo al escribir o revisar una prueba de componentes que ejercite un React…
studio-ui-patterns
supabase
Patrones de UI del sistema de diseño para Supabase Studio. Úsalo al crear o actualizar páginas, formularios, tablas, gráficos, estados vacíos, navegación, tarjetas, alertas o barra lateral…
react-hook-form
supabase
Uso correcto de React Hook Form en cualquier parte del monorepo — flujo de datos, suscripciones, reset, estado sucio, entradas numéricas y reglas de entradas controladas. Cargar esto…
studio-queries
supabase
Convenciones de React Query para la obtención de datos en Supabase Studio. Úsalo al escribir o revisar hooks de consulta, hooks de mutación o claves de consulta en apps/studio/data/ —…