vitest

Configure, run, and debug Vitest test suites in JavaScript/TypeScript projects.

19|Updated Feb 21, 2026
One-click install
npx skills add https://github.com/hamsurang/kit --skill vitest-hamsurang
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vitest
Source: https://github.com/hamsurang/kit/tree/main/plugins/vitest/skills/vitest
Command: npx skills add https://github.com/hamsurang/kit --skill vitest-hamsurang

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Vitest integration simplifies writing, running, and diagnosing tests in JavaScript/TypeScript projects, enabling faster feedback and safer code.

Core Features & Use Cases

  • Write tests using Vitest's describe/it/expect style and take advantage of its fast, Vite-friendly execution
  • Configure tests via vitest.config.ts or vite.config.ts with environment, setup files, and coverage options
  • Debug failing tests, mock modules, and measure coverage in CI or local development

Quick Start

Install Vitest as a dev dependency and run your first tests.

Frequently Asked Questions about vitest

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

FAQPage Schema
How do I configure Vitest with vite.config.ts for environment and coverage?

Configure Vitest tests by defining environment, setup files, and coverage options within vitest.config.ts or vite.config.ts to control execution and reporting.

What is the best way to mock modules in Vitest for JavaScript testing?

Mock modules in Vitest by utilizing its built-in mocking capabilities to isolate dependencies, allowing you to safely debug failing tests and verify interactions.

How do I use describe, it, expect, and vi to write Vite test suites?

Write Vitest test suites using the describe, it, expect, and vi APIs to structure tests, assert outcomes, and handle mocking within Vite-powered applications.

Does Vitest work with Node utilities and CI pipelines?

Vitest works with Node utilities and CI pipelines by executing Vite-friendly test suites, measuring coverage, and providing fast feedback for JavaScript and TypeScript projects.

Why measure coverage in Vitest during local development?

Measure coverage in Vitest during local development to ensure safer code by tracking tested code paths, satisfying workflow requirements, and diagnosing gaps before CI integration.