$npx skillfedfor your agent

vitest

Vitest is a next-generation test framework powered by Vite, delivering rapid test execution through HMR and native ESM support. It offers built-in TypeScript integration, Jest-compatible APIs for easy migration, and component testing for React and Vue projects.

Vitest enables fast TypeScript unit testing with Vite-native performance and ESM-first design.

AI-generated summary based on this skill's SKILL.md

62 18 MITupdated by bobmatnyc

Decision gist · record as of 2026-07-18

Vitest enables fast TypeScript unit testing with Vite-native performance and ESM-first design. Vitest is a next-generation test framework powered by Vite, delivering rapid test execution through HMR and native ESM support. It offers built-in TypeScript integration, Jest-compatible APIs for easy migration, and component testing for React and Vue projects.

manual: git clone https://github.com/bobmatnyc/claude-mpm-skills → cp -r claude-mpm-skills/toolchains/typescript/testing/vitest ~/.claude/skills/vitest
toolchains/typescript/testing/vitest/SKILL.md · version ede317ed

Use it when

  • Vitest provides straightforward setup for TypeScript and JavaScript projects.
  • Yes, Vitest supports component testing for both React and Vue projects when paired with Testing Library.

Verify before relying

Read SKILL.md below before installing (4 files). Open directory: indexed for reading, not audited.

Same gist for agents: .md · .json

Install

bobmatnyc/claude-mpm-skills/vitest · repository language: Python

Open directory. Skills are indexed for reading, not audited. Review a skill's body before installing it.

Frequently asked questions

AI-generated answers based on this skill's SKILL.md and metadata

What is vitest and how does it compare to Jest?

Vitest is a next-generation test framework powered by Vite that delivers rapid test execution through HMR and native ESM support. Unlike Jest, Vitest offers built-in TypeScript integration and Jest-compatible APIs for easy migration, making it ideal for modern projects. Vitest excels at speed through Vite's transformation pipeline and hot module reloading during watch mode.

How do I set up vitest for TypeScript/JavaScript unit testing?

Vitest provides straightforward setup for TypeScript and JavaScript projects. Install vitest via npm or yarn, then create a vitest.config.ts file to configure your test environment. Vitest automatically detects and transpiles TypeScript files without additional configuration. Define your test files with .test.ts or .spec.ts extensions, then run vitest in watch mode or CI mode for single runs.

Can vitest be used for component testing with React and Vue?

Yes, Vitest supports component testing for both React and Vue projects when paired with Testing Library. Vitest component testing enables you to test component rendering, user interactions, and state changes. The framework integrates seamlessly with Testing Library's query methods and assertions, providing a familiar testing experience for component-focused development.

How do I migrate from Jest to vitest?

Migrating from Jest to Vitest is straightforward because Vitest maintains Jest-compatible APIs. Most test files require minimal changes—simply update import statements and configuration files. Vitest supports Jest's expect matchers, mocking utilities, and setup patterns. Run vitest with your existing test suite to identify any compatibility issues, then adjust as needed for Vitest-specific features like native ESM support.

What mocking and spies capabilities does vitest provide?

Vitest offers comprehensive mocking and spies functionality including function mocking, module mocking, and timer mocking for fake timers. You can spy on function calls, track arguments, and control return values. Vitest supports vi.mock() for module mocking, vi.fn() for function spies, and vi.useFakeTimers() for time-based testing, all compatible with Jest's mocking patterns.

How do I configure code coverage and run vitest in watch mode?

Vitest supports code coverage configuration through built-in providers like c8 or Istanbul. Enable coverage in your vitest.config.ts file and specify thresholds and reporters. Watch mode with HMR allows tests to re-run automatically when files change, providing instant feedback during development. Use vitest --watch for development and vitest --run for CI environments.

SKILL.md

Rendered from the published skill. Quoted content, verbatim.

Vitest - Modern TypeScript Testing

Overview

Vitest is a next-generation test framework powered by Vite, designed for modern TypeScript/JavaScript projects. It provides blazing-fast test execution through HMR-based test running, native ESM support, and first-class TypeScript integration.

Key Features: - ⚡

(truncated - see the full file via the links below)

File tree — 4 files
toolchains/typescript/testing/vitest/CODE_EXAMPLES_INDEX.md
toolchains/typescript/testing/vitest/IMPLEMENTATION_SUMMARY.md
toolchains/typescript/testing/vitest/SKILL.md
toolchains/typescript/testing/vitest/metadata.json

Let your AI agent find skills like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 56,283 agent skills by what they can do, searchable in plain language.

wish › “Set up and configure Vitest for TypeScript/JavaScript unit testing”

Give your agent the search over MCP, or paste the wish link into any chat. No install? Search from any chat →

Related skills

jest
by bobmatnyc · bobmatnyc/claude-mpm-skills

This skill streamlines Jest configuration for TypeScript projects, handling setup automation and intelligent toolchain detection. It integrates with Claude's multi-agent ecosystem to accelerate test infrastructure deployment across diverse development stacks.

MITupdated Jul 2026
★ 62repo stars
vitest-testing-patterns
by curiositech · curiositech/some_claude_skills

Master test writing with Vitest and React Testing Library through practical patterns for units, components, and integration scenarios. Learn mocking strategies for APIs and external dependencies, plus file organization and coverage setup.

MITfor claude-codeupdated Jul 2026
★ 164repo stars
testing-expert
by personamanagmentlayer · personamanagmentlayer/pcl

Testing Expert guides you through building robust test suites using proven methodologies and modern frameworks. Learn the test pyramid, mocking strategies, and coverage targets across multiple languages including Vitest, Pytest, Go testing, and JUnit 5.

Apache-2.0updated Mar 2026
★ 38repo stars
React Testing
by majesticlabs-dev · majesticlabs-dev/majestic-marketplace

Master React testing through practical patterns for Vitest, React Testing Library, and Jest. This skill covers component and hook testing, form validation, mocking APIs, and integration scenarios with context and routing. Apply behavior-focused testing practices to catch real bugs and build confidence in your code.

no license declared → metadata onlyupdated May 2026
★ 44repo stars
react-testing
by affaan-m · affaan-m/ECC

Master unit testing for React components by querying the DOM as users do, not by inspecting implementation details. This skill covers React Testing Library patterns, userEvent interactions, network mocking with MSW, custom hook testing, and accessibility checks with axe. Learn when to reach for Vitest, Jest, or browser-based runners, and how to structure provider-wrapped tests that mirror production.

MITupdated Jul 2026
★ 234,207repo stars
Jest React Testing
by manutej · manutej/luxor-claude-marketplace

This skill teaches you to test React components effectively using Jest and React Testing Library. You'll learn configuration setup, query strategies, mocking techniques, async testing patterns, custom hooks testing, and integration approaches that follow user-behavior-first principles.

no license declared → metadata onlyupdated Jun 2026
★ 61repo stars

More skills mypy (MIT) · pytest (MIT)

Tags
test-runnervite-ecosystemesm-nativejest-alternativecomponent-testingtype-safe-testinghot-reload-testingcoverage-toolsmock-frameworktypescript-first