Skip to content
Back to skills

Vitest

ASecurity

Vite integration, ESM support, describe/it/expect, mocking (vi.mock), snapshot testing, coverage, watch mode, CI config.

  • 47 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added September 12, 2026
testingnodetesting

Security analysis

A100/100

Scanned September 12, 2026

npx -y skills add skeletorflet/opencode-supreme-setup --skill vitest --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Vitest?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Vitest
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/skeletorflet-vitest/badge)](https://www.skillsdirectory.com/skills/skeletorflet-vitest)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: vitest
description: Vite integration, ESM support, describe/it/expect, mocking (vi.mock), snapshot testing, coverage, watch mode, CI config.
---

## vitest

Blazing fast unit testing with Vite.

### Setup and config
- Vite integration: zero-config for Vite projects
- vitest.config.ts: customize test behavior
- Global setup and teardown
- Environment: node, jsdom, happy-dom

### Test structure
- describe, it, test blocks
- expect assertions with matchers
- beforeEach, afterEach, beforeAll, afterAll
- Test filtering with .only, .skip, .todo

### Mocking
- vi.mock for module-level mocking
- vi.spyOn for function spies
- vi.fn for fake implementations
- vi.useFakeTimers for time control

### Advanced
- Snapshot testing with toMatchSnapshot
- Coverage reports with c8/istanbul
- Watch mode with --ui
- CI: --reporter=junit, --reporter=json

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.