vitest

от antfu

Быстрый фреймворк для модульного тестирования на основе Vite с API, совместимым с Jest. Используйте при написании тестов, создании моков, настройке покрытия или работе с фильтрацией тестов и фикстурами.

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

supabase
supabase
Используйте при выполнении ЛЮБОЙ задачи, связанной с Supabase. Триггеры: продукты Supabase (Database, Auth, Edge Functions, Realtime, Storage, Vectors, Cron, Queues); клиент…
official
slack-delivery
vercel
Специализированный рабочий процесс для каналов Slack: отладка Slack OAuth и готовность к доставке, быстрый путь /slack/events, подписи необработанного тела, восстановление маршрутов, очистка загрузочных сообщений и…
official
automate-github-issues
google-labs-code
Настройка автоматизированной обработки и решения задач GitHub с использованием параллельных агентов кодирования Jules
official
canva-creator
anthropic
Принимает утверждённый бриф контента и выполняет кампанию от начала до конца: создаёт календарь публикаций, генерирует дизайны в Canva для постов в соцсетях, пишет черновики подписей и…
official
setup-zoom-webhooks
anthropic
Эталонный навык для вебхуков Zoom. Используется после маршрутизации к событийно-ориентированному рабочему процессу при реализации подписок, проверки подписей, обработки доставки,…
official
dbs-bridge
dontbesilent2025
Agent 基建:把任意 skill 或 skill 集合目录桥接到 Claude Code(~/.claude/skills)、Codex(~/.codex/skills)、通用 Agents(~/.agents/skills,豆包 Mac App / Trae Solo / Codex 可读取)和 Grok(~/.grok/skills)。支持 dbskill 仓库内 skill,也支持外部 skill 绝对路径。Claude / Codex / 通用 Agents 使用软链,Grok 生成带 user_invocable: true 的薄 bridge。支持按 skill 名称、相对路径、绝对路径、skills 目录批量桥接,也支持拆桥和查看桥接状态。 触发方式:/dbs-bridge、/bridge、「桥接这个 skill」「桥接整个 skills 目录」「把这个 skill 接到 Claude Code、Codex、豆包和 Grok」「让多个 Agent 都能调用这个 skill」「取消桥接」「查看桥接状态」 Bridge any skill folder or...
developmentdevopsproductivity
otel-instrumentation
dash0hq
Настраивает трейс-спаны, определяет пользовательские метрики, настраивает экспортеры логов и оптимизирует стратегии семплинга для инструментирования OpenTelemetry. Используйте, когда…
official
deepclaw-voice
deepgram
Настройка телефонных звонков в OpenClaw с помощью Deepgram Voice Agent API
official