
Vitest Testing
This gives Claude expertise in Vitest, the Vite-powered testing framework that's become the go-to for modern TypeScript and JavaScript projects. You get comprehensive coverage of the testing workflow: setup with vitest.config.ts, writing tests with describe/it blocks, parametrized tests, mocking functions and modules, timer manipulation, and coverage reporting. The skill emphasizes using bun as the test runner and includes practical patterns for both unit and integration testing. Honestly, if you're already using Vite for your build tooling, Vitest is the obvious choice since it shares the same config and transform pipeline. The examples are solid and cover the full assertion API plus real-world scenarios like API endpoint testing.
- skills.sh installs
- 1.3K
- GitHub stars
- 248
- last updated
- Aug 21, 2026
Install
$ npx -y skills add secondsky/claude-skills --skill vitest-testing --agent claude-codeInstalls into .claude/skills of the current project.
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
Sponsors
Details
- Repository
- github.com/secondsky/claude-skills
- Category
- Testing & QA
- First seen
- Jun 3, 2026
More from secondsky/claude-skills
All 146- Motion1.1K
- Playwright1.1K
- Api Testing910
- Responsive Web Design703
- Zod663
- Nano Banana Prompts626
- Image Optimization604
- Rest Api Design600
- Mobile First Design598
- Web Performance Optimization576
- Inspira Ui572
- Api Authentication549
- Code Review548
- Web Performance Audit542
- Vulnerability Scanning534
- Kpi Dashboard Design526
- Progressive Web App523
- Tanstack Table513
- Architecture Patterns508
- Api Rate Limiting507
- Api Security Hardening506
- Better Auth502
- Design System Creation500
- React Composition Patterns494