Command Palette

Search for a command to run...

Back to skills
skill № 98065

vitest

"Use for Vitest in TypeScript projects (Node, bun, React/Next.js, Effect): write, run, or debug unit/component tests, mocks, testing utilities, and coverage."

FreeNo executable scripts
PaulRBergby PaulRBerg★ 109 GitHub stars

Install vitest in Claude Code & Claude Desktop

Sign up to install this skill

Create a free account to reveal the install command and save the skill to your library.

  • Reveal the one-line install command
  • Save skills to your synced library
  • Get notified when skills update
Sign up freeI already have an account

About this skill

Vitest

Repository configuration, projects, setup, imports/globals, environments, aliases, test placement, and cleanup own the test contract. Inspect them and nearby tests before adding generic patterns. Do not add globals, jsdom, coverage, new setup, or browser mode by default.

Workflow

Define the behavior or regression. Test its observable public result. Mock system boundaries rather than the behavior under test. Follow local fixture and cleanup ownership. In Effect repositories, use established @effect/vitest conventions such as it.effect, Layers, and TestClock rather than generic replacements. For a bug fix, reproduce the failure before relying on a passing result when practical.

Read patterns for component, async, fixture, snapshot, tag, or browser questions. Read mocking for module, timer, spy, or global boundaries. Read configuration for projects, migration, coverage, or reporter selection. Read troubleshooting for hangs, discovery, resolution, or flaky state.

For test changes, run the narrowest established command for the changed behavior, then the affected package suite only when shared setup or contracts changed. Use nlx vitest run only when no project recipe or script exists. Reuse passing results until new edits, failures, or unresolved concerns justify another run.

Completion requires a meaningful passing focused test under repository configuration and concise command/result evidence for test changes. A read-only explanation instead requires supporting configuration or API evidence. Do not add or run tests merely to satisfy the change workflow. When red-before-green evidence exists, use ### 🧪 Regression covered. Otherwise, use ### 🧪 Tests verified for executed tests.

Allowed tools

Tools this skill is permitted to call.

No restriction — this skill can use any tool.

Bundled files

  • agents/openai.yaml
  • references/configuration.md
  • references/mocking.md
  • references/testing-patterns.md
  • references/troubleshooting.md

FAQ

What does the vitest skill do?

"Use for Vitest in TypeScript projects (Node, bun, React/Next.js, Effect): write, run, or debug unit/component tests, mocks, testing utilities, and coverage."

How do I install the vitest skill?

Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.

Does the vitest skill run scripts?

No, this skill is instructions only (SKILL.md) with no executable scripts.

Related skills

Compare vitest with