Install any skill in seconds. Free to start, no credit card required.
Get Started Free →jezweb/vitest
Set up Vitest testing in any project — detects type (Cloudflare Workers, React, Node, library), generates vitest.config.ts, test setup, utilities, and a sample test. Covers mocking patterns, coverage config, workspace setup, Jest migration.
Passed 14 of 20 test cases with the skill, and 10 of 20 without it.
and 1 more in the full report
4 fixed11 passed either way7 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 4 test cases the skill fixed. Same model, same prompt, with and without the skill.
We have existing test suites using Jest helper functions like `jest.fn()`, `jest.spyOn()`, `jest.mock()`, and `jest.clearAllMocks()`. When migrating to Vitest, what namespace replaces `jest`?
| Checked | Without skill | With skill |
|---|---|---|
| Replaces jest global references with vi | Passed | Passed |
| Maps jest.requireActual calls to vi.importActual | Missed | Passed |
The instructions your model reads when the skill loads.
Detect the project type, generate the right Vitest configuration, and produce working test infrastructure. Not a reference card — this skill creates files.
Read these files to determine the project:
package.json → dependencies, scripts, type field
tsconfig.json → paths, compiler options
wrangler.toml → Cloudflare Workers project
vite.config.ts → existing Vite setup (extend, don't replace)
vitest.config.ts → already configured? just fill gaps
jest.config.* → migration candidate
src/ → source structure
Classify as one of:
| Type | Signals | Environment |
|---|---|---|
| Cloudflare Workers | wrangler.toml, @cloudflare/workers-types, cloudflare vite plugin | node with Workers-specific setup |
| React (Vite) | @vitejs/plugin-react, react-dom | jsdom or happy-dom |
| React (SSR/TanStack Start) | @tanstack/start, vinxi | Split: node for server, jsdom for client |
| Node/Hono API | hono, express, no react-dom | node |
| Library | exports field, no framework deps | node |
If a vite.config.ts already exists, extend it rather than creating a separate vitest.config.ts — Vitest reads Vite config natively.
Generate the install command based on detected type:
test cases passed, vs 10 / 20 without
Published skills whose descriptions closely match this one, with their headline benchmark lift.
More skills from the same source and nearby in the registry, with their headline benchmark lift.