All skills

Vitest 4+ testing with Vite. Use when configuring vitest.config.ts, writing unit/integration/browser tests, implementing mocks with vi.fn/vi.spyOn/vi.mock, setting up V8 or Istanbul coverage, or migrating from Jest or older Vitest workspace setups. Triggers on vitest, vitest.config.ts, vi.mock, browser mode, vitest/browser, projects, setupFiles, and toMatchScreenshot.

Use this Skill: https://skilld.dev/gh/nodnarbnitram/claude-code-extensions/vitest-v4

This session only. Nothing lands on disk.

referencespools-execution-reference.md

≈352 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Vitest v4 Pools and Execution Reference

Large or flaky suites often need execution tuning as much as they need better assertions.

Pool Selection Heuristic

Pool Best For Main Risk
forks Stability, native modules, mixed infra tests Slightly slower than threads
threads Fast pure-JS suites with safe worker-thread behavior Native module and runtime compatibility issues
vmThreads / vmForks Sandbox-style experiments only Memory leaks and global-object mismatch surprises

Recommended Default

Start with forks unless you have a measured reason not to. It is the safer default for real-world suites that touch native dependencies, runtime integration layers, or tooling that assumes process isolation.

Isolation Tradeoff

isolate: false can speed up pure Node suites significantly, but only use it when tests are intentionally side-effect-safe and you understand the shared-state risks.

Persistent Module Cache

For large codebases, experimental.fsModuleCache can cut cold-start cost by persisting transformed modules between runs.

Debugging Heuristic

  • Native dependency failures in threads → try forks
  • Memory weirdness in VM pools → remove VM pools first
  • Slow cold starts in huge repos → evaluate filesystem module cache
  • Random state leakage → review isolation mode before rewriting tests

Source: SKILL.md on GitHub

No alerts15d3 checks · Risk SAFE
  • Gen Agent Trust Hub15d

    The skill provides comprehensive and safe instructions for using Vitest 4. No malicious patterns, obfuscation, or security vulnerabilities were detected. It effectively guides users toward best practices, such as avoiding hanging processes in non-interactive environments and using official ecosystem packages.

  • Socket15d

    No alerts

  • Snyk15d

    Risk: LOW · No issues

Signed by skilld at ca1a51b. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 months ago.

Steadyupdated 6 months ago
version
1.0.0
metadata
{
  "author": "Brandon Martin"
}

README badge

README badge for nodnarbnitram/claude-code-extensions/vitest-v4