Agent skill · Testing & QA

vitest-skill

Generates Vitest tests in JavaScript/TypeScript with Vite-native speed. Jest-compatible API with ESM support and HMR. Use when user mentions "Vitest", "vi.mock", "vitest.config". Triggers on: "Vitest", "vi.mock", "vi.fn", "Vite test", "vitest config".

Nick44,086★ · +407/wk · 1 repos on radarProfile →
claude-codecodexcursorMIT
Install
npx skills add sickn33/agentic-awesome-skills --skill vitest-skill --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 1
SKILL.md size: 5 KB
Bundled scripts: none
Path: skills/vitest-skill/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 44,414 · +328 this week
Language: Python
Read our review of the source →

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# Vitest Testing Skill ## When to Use Use this skill when you need generates Vitest tests in JavaScript/TypeScript with Vite-native speed. Jest-compatible API with ESM support and HMR. Use when user mentions "Vitest", "vi.mock", "vitest.config". Triggers on: "Vitest", "vi.mock", "vi.fn", "Vite test", "vitest config". ## Core Patterns ### Basic Test ```typescript import { describe, it, expect, vi, beforeEach } from 'vitest'; import { Calculator } from './calculator'; describe('Calculator', () => { let calc: Calculator; beforeEach(() => { calc = new Calculator(); }); it('adds two numbers', () => { expect(calc.add(2, 3)).toBe(5); }); it('throws on divide by zero', () => { expect(() => calc.divide(10, 0)).toThrow(); }); }); ``` ### Mocking (vi instead of jest) ```typescript import { vi } from 'vitest'; // Mock module vi.mock('./database', () => ({ getUser: vi.fn().mockResolvedValue({ name: 'Alice' }), saveUser: vi.fn().mockResolvedValue(true), })); // Mock function const mockFn = vi.fn(); mockFn.mockReturnValue(42); mockFn.mockResolvedValue({ data: 'test' }); // Spy const spy = vi.spyOn(console, 'log').mockImplementation(() => {}); expect(spy).toHaveBeenCalledWith('message'); spy.mockR

What's inside
Steps it walks through
  1. When to Use
  2. Core Patterns
  3. Basic Test
  4. Mocking (vi instead of jest)
  5. In-Source Testing
  6. Snapshot Testing
  7. React Component Testing
  8. Anti-Patterns
  9. Quick Reference
  10. vitest.config.ts
  11. Deep Patterns → reference/playbook.md
  12. Limitations
More from agentic-awesome-skills
All skills →
About this skill
What does the vitest-skill skill do?

Generates Vitest tests in JavaScript/TypeScript with Vite-native speed. Jest-compatible API with ESM support and HMR. Use when user mentions "Vitest", "vi.mock", "vitest.config". Triggers on: "Vitest", "vi.mock", "vi.fn", "Vite test", "vitest config".

How do I install it?

Run `npx skills add sickn33/agentic-awesome-skills --skill vitest-skill --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From sickn33/agentic-awesome-skills, a repository with 44,414 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going