vitest

Installation
SKILL.md

Vitest

Commands

Task Command
Run all tests pnpm test
Watch / UI mode pnpm test:development
Install browsers pnpm test:install-browsers

Default action: When asked to "run tests" or "run vitest" without further qualification, run pnpm test.

The exact scripts behind these commands vary by project — always check package.json to confirm what each script invokes before running it.

Before running or writing tests — explore the project first

Read the project's vitest.config.mts (or vitest.config.ts / vite.config.ts) to understand:

  • Which test environment is active (node, browser, jsdom, happy-dom, etc.) — this determines what globals and APIs are available in tests
Related skills
Installs
10
First Seen
Apr 11, 2026