vitest

Automate unit and integration testing workflows with Vitest for JavaScript and TypeScript projects.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/ForeverWorld/curdx-ralph --skill vitest-foreverworld
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vitest
Source: https://github.com/ForeverWorld/curdx-ralph/tree/main/skills/vitest
Command: npx skills add https://github.com/ForeverWorld/curdx-ralph --skill vitest-foreverworld

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Vitest provides a fast, Jest-compatible test runner for modern JavaScript/TypeScript projects, enabling quick feedback and reliable tests during development.

Core Features & Use Cases

  • Jest-compatible API with native ESM support and instant watch mode for rapid feedback
  • Vite-native performance that integrates with Vite configs and shared tooling
  • Smooth migration from Jest with minimal changes, including support for vi.fn and vi.mock

Quick Start

Install Vitest in your project and run tests using your configured test script.

Frequently Asked Questions about vitest

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I migrate from Jest to Vitest for JavaScript unit testing?

Migrating from Jest to Vitest is smooth because Vitest offers a Jest-compatible API with native ESM support. You can transition with minimal changes by utilizing vi.fn and vi.mock to maintain your existing unit testing workflows.

How do I configure coverage thresholds in vitest.config.ts?

You can enforce inline coverage thresholds by configuring them within your vitest.config.ts file. This setup ensures code quality standards are met during automated unit and integration testing workflows using Vitest.

Does Vitest work with an existing Vite configuration?

Yes, Vitest provides Vite-native performance that integrates directly with your existing Vite configs. This allows you to share tooling across development and testing environments in modern JavaScript and TypeScript projects.

What's the best way to speed up JavaScript unit testing feedback loops?

Using Vitest speeds up tests with its instant watch mode and Vite-native performance. It provides fast feedback for modern JavaScript and TypeScript projects by reusing Vite configurations and supporting native ESM.

Can I use vi.mock and vi.fn for mocking in Vitest?

Yes, Vitest supports vi.fn and vi.mock for creating mocks in your unit and integration tests. These APIs are part of the Jest-compatible interface designed to facilitate smooth migration and reliable test creation.

Do I need a Vite-compatible setup to run Vitest?

Yes, Vitest requires a Vite-compatible setup to function properly. It leverages Vite-native performance and shared tooling to execute unit and integration testing workflows for JavaScript and TypeScript projects.