Vitest Testing
Modern Vitest guide for TypeScript and JavaScript tests, covering unit, integration, mocking, and coverage workflows.
- CCM score
- 52 of 100
- skills.sh installs
- 1.3K
- GitHub stars
- 257
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers configuration, running tests, writing assertions, mocking functions, modules, and timers, plus coverage reporting
- Includes
vitest.config.tssetup with v8 coverage thresholds of 80 percent for lines, functions, and branches - Documents CLI usage such as
bun test --run,--coverage,--grep, and--uifor CI and interactive work - Designed for TypeScript and JavaScript projects that want fast tests with native ESM support and Vite-powered tooling
Install
$ npx -y skills add secondsky/claude-skills --skill vitest-testing -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
Vitest Testing
Expert knowledge for testing JavaScript/TypeScript projects using Vitest - a blazingly fast testing framework powered by Vite.
Quick Start
Installation
# Using Bun (recommended)
bun add -d vitest
# Using npm
npm install -D vitest
Configuration
// vitest.config.ts
import { defineConfig } from 'vitest/config'
export default defineConfig({
test: {
globals: true,
environment: 'node', // or 'jsdom'
coverage: {
provider: 'v8',
reporter: ['text', 'json', 'html'],
thresholds: { lines: 80, functions: 80, branches: 80 },
},
include: ['**/*.{test,spec}.{js,ts,jsx,tsx}'],
},
})
Running Tests
# Run all tests (prefer bun)
bun test
# Watch mode (default)
bun test --watch
# Run once (CI mode)
bun test --run
# With coverage
bun test --coverage
# Specific file
bun test src/utils/math.test.ts
# Pattern matching
bun test --grep="calculates sum"
# UI mode (interactive)
bun test --ui
# Verbose output (in Vitest 2+, --reporter=verbose prints a flat list;
# use --reporter=tree for the hierarchical tree view)
bun test --reporter=verbose
Writing Tests
Basic Structure
Details
- Repository
- github.com/secondsky/claude-skills
- Categories
- Testing & QA, Frontend & UI Code
- First seen
- Jun 3, 2026
Questions
What is the vitest-testing skill for?
The vitest-testing skill guides an agent through testing TypeScript and JavaScript projects with Vitest, covering fast unit and integration tests, native ESM support, and mocking. It is meant for teams that want to test TS and JS code with this framework.
How do I install the vitest-testing skill?
Run npx -y skills add secondsky/claude-skills --skill vitest-testing -y in your project. This installs the skill so your agent can use Vitest guidance for writing and running tests.
Where does vitest-testing rank in the Testing & QA category?
vitest-testing is listed in the Testing & QA category on Claude Marketplaces, alongside tdd, migrate-to-shoehorn, test-driven-development, webapp-testing and break-ui. It focuses on Vitest specifically, covering configuration, mocking, timers, coverage and integration tests with supertest.
What does the vitest-testing skill need to run?
The skill's SKILL.md recommends installing Vitest with Bun or npm, and it includes a vitest.config.ts setup with options such as globals and environment set to node or jsdom. Its examples run tests through bun test, so the project needs a working Bun or npm setup.
More from secondsky/claude-skills
All 116- Motion1.2K
- Playwright1.1K
- Api Testing929
- Responsive Web Design731
- Zod677
- Nano Banana Prompts655
- Mobile First Design629
- Image Optimization622
- Rest Api Design614
- Web Performance Optimization600
- Inspira Ui589
- Web Performance Audit569
- Api Authentication563
- Progressive Web App562
- Code Review561
- Kpi Dashboard Design547
- Vulnerability Scanning547
- Bun Sqlite543
- Bun Sveltekit526
- Api Security Hardening525
- Tanstack Table525
- Architecture Patterns523
- Api Rate Limiting518
- Threejs518
Similar to Vitest Testing
More Testing & QAjavascript-testing-patternswshobson/agents21.8K installsComprehensive testing guide covering Jest and Vitest setup, unit, async, and mocking patterns for JavaScript and TypeScript.
vitestantfu/skills50.1K installsVitest-based unit testing guidance covering the Jest-compatible API, mocking, coverage, and test filtering.
test-quality-analysissecondsky/claude-skills481 installsPractical review guide that flags test smells such as overmocking, fragile selectors, flaky async code, and weak assertions.
jest-generatorsecondsky/claude-skills402 installsGenerates Jest unit tests for JavaScript and TypeScript with mocking, async handling, and React component coverage.
test-coverage-improveronewave-ai/claude-skills325 installsAnalyzes coverage gaps and writes missing tests for JavaScript and TypeScript projects using Jest, Vitest, or NYC.