Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Run Vitest tests and parse results into actionable output.
.claude/skills/notque-vitest-runner/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-03 | ✗→✓ | ▲ Improved | 11% | 0% |
| case-04 | ✗→✓ | ▲ Improved | 62% | 0% |
| case-06 | ✗→✓ | ▲ Improved | 20% | 0% |
| case-07 | ✗→✓ | ▲ Improved | 45% | 0% |
| case-08 | ✗→✓ | ▲ Improved | 40% | 0% |
This skill runs Vitest tests and parses results into actionable reports. It executes tests in non-interactive mode, extracts failure details (test name, assertion error, stack trace), and organizes results by test file with timing information. Use this skill when tests need to run and results need structured, complete reporting—not when tests need installation, creation, modification, or auto-fixing.
Before running tests, confirm Vitest is installed and configured. Why: Running tests in a non-Vitest project wastes time and produces misleading results. This skill is designed only for Vitest—not Jest, Mocha, or Playwright.
Verify vitest is available:
bash# Check for vitest configuration ls vitest.config.* vite.config.* 2>/dev/null grep -q "vitest" package.json && echo "vitest found in package.json"
If no vitest configuration found, stop and inform the user. Do not attempt to install dependencies or configure Vitest—that is outside this skill's scope.
Execute Vitest using the run subcommand (not bare npx vitest, which starts interactive watch mode and will never complete in a non-interactive shell). Why: Watch mode is interactive and incompatible with automation. The run mode executes all tests once and exits with a status code reflecting pass/fail.
Default execution:
bashnpx vitest run --reporter=verbose 2>&1
For specific files or patterns (optional behavior):
bashnpx vitest run path/to/test.ts 2>&1 npx vitest run --grep "pattern" 2>&1
For coverage reporting (when user requests coverage):
bashnpx vitest run --coverage 2>&1
Capture the full exit code and output. Why: The exit code is the source of truth for pass/fail—code 0 = pass, nonzero = fail. Never assume tests passed based on partial output. Show all failures completely, including test names, assertion errors, and stack traces. Hiding failures prevents users from fixing them.
Extract for each test:
Present output in a format that groups failures by test file and includes complete error details. Why: Users need to see which tests failed, why they failed, and where in the code the assertions failed—this prevents wasted debugging time.
Example format:
=== Vitest Test Results ===
Status: PASS / FAIL (X passed, Y failed, Z skipped)
Failures:
---------
FAIL src/utils/__tests__/helpers.test.ts > parseData > handles null input
AssertionError: expected null to equal { data: [] }
- Expected: { data: [] }
+ Received: null
at src/utils/__tests__/helpers.test.ts:25:10
Summary:
--------
Test Files: 12 passed, 2 failed (14 total)
Tests: 45 passed, 3 failed, 2 skipped (50 total)
Duration: 4.23sCause: Vitest not installed or node_modules missing Constraint: This skill does not install dependencies; it assumes a fully configured Vitest project. Solution: Advise user to check grep vitest package.json for presence, then run npm install or npm install -D vitest. After installation, re-run this skill.
Cause: Test file patterns don't match vitest.config include/exclude globs Constraint: Test discovery is driven by Vitest's configuration; this skill does not modify vitest.config.ts. Solution: Verify test files exist with correct naming (.test.ts, .spec.ts, .test.js, etc.) and match the patterns in vitest.config include/exclude. Show user the vitest.config.ts to help them debug the mismatch.
Cause: Missing jsdom or happy-dom dependency for DOM tests Constraint: This skill does not install dependencies or modify configurations. Solution: Check vitest.config.ts environment setting (likely environment: 'jsdom' or 'happy-dom'). Advise user to install the required devDependency: npm install -D jsdom or npm install -D happy-dom, or @testing-library/jest-dom for additional matchers.
Cause: Too many tests running in shared thread pool Constraint: This skill runs all tests in the suite; it does not pre-filter by complexity. Solution: When memory errors occur, advise user to split test execution: run tests in batches by directory (e.g., npx vitest run src/unit/), use --pool=forks for memory isolation, or use --shard=1/N to split the suite across N shards. The user controls which tests to run; this skill respects that choice.
Constraint: Do not auto-fix tests. This skill's role is to report test failures completely, not to fix them. The test may be correct and the implementation wrong—only the user knows. Changing test assertions to make them pass would hide real bugs and violate the skill's scope.
Constraint: Always use npx vitest run, not bare npx vitest. Watch mode is interactive and incompatible with non-interactive execution. The skill must use run mode to ensure tests execute once and exit with a status code.
Constraint: Show all failures completely. Reporting "3 tests failed" without showing which tests or why wastes user time. Stack traces, assertion details, and test names are essential for debugging. Never abbreviate failure output.
Constraint: Respect exit codes as source of truth. The process exit code (0 = pass, nonzero = fail) is the definitive signal. Do not rely on partial output or assumptions about test results.
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→fail | 4,406 | 4,781 | +9% | 1 | 1 | 0% | 283 | 1,688 | +496% | 0 | 0 | — |
case-16 | fail→fail | 16,203 | 13,823 | -15% | 1 | 1 | 0% | 3,682 | 4,313 | +17% | 0 | 0 | — |
case-02 | fail→fail | 5,500 | 4,077 | -26% | 1 | 1 | 0% | 409 | 1,690 | +313% | 0 | 0 | — |
case-03 | fail→pass | 12,024 | 6,304 | -48% | 1 | 1 | 0% | 2,349 | 2,597 | +11% | 0 | 0 | — |
case-04 | fail→pass | 8,265 | 5,006 | -39% | 1 | 1 | 0% | 1,476 | 2,395 | +62% | 0 | 0 | — |
case-05 | fail→fail | 4,456 | 1,843 | -59% | 1 | 1 | 0% | 828 | 1,823 | +120% | 0 | 0 | — |
case-06 | fail→pass | 10,914 | 4,500 | -59% | 1 | 1 | 0% | 2,004 | 2,401 | +20% | 0 | 0 | — |
case-07 | fail→pass | 9,188 | 3,627 | -61% | 1 | 1 | 0% | 1,520 | 2,197 | +45% | 0 | 0 | — |
case-08 | fail→pass | 11,400 | 8,155 | -28% | 1 | 1 | 0% | 2,076 | 2,902 | +40% | 0 | 0 | — |
case-09 | fail→fail | 8,722 | 7,276 | -17% | 1 | 1 | 0% | 1,777 | 2,610 | +47% | 0 | 0 | — |
case-10 | pass→pass | 7,684 | 4,375 | -43% | 1 | 1 | 0% | 1,273 | 2,222 | +75% | 0 | 0 | — |
case-11 | pass→pass | 6,354 | 2,801 | -56% | 1 | 1 | 0% | 1,080 | 1,952 | +81% | 0 | 0 | — |
case-12 | fail→pass | 9,311 | 2,806 | -70% | 1 | 1 | 0% | 1,466 | 1,937 | +32% | 0 | 0 | — |
case-13 | fail→pass | 6,885 | 3,095 | -55% | 1 | 1 | 0% | 1,109 | 2,038 | +84% | 0 | 0 | — |
case-14 | fail→fail | 6,731 | 8,490 | +26% | 1 | 1 | 0% | 1,332 | 2,080 | +56% | 0 | 0 | — |
case-15 | fail→pass | 3,053 | 4,236 | +39% | 1 | 1 | 0% | 375 | 2,266 | +504% | 0 | 0 | — |
case-17 | pass→pass | 6,128 | 1,846 | -70% | 1 | 1 | 0% | 1,127 | 1,793 | +59% | 0 | 0 | — |
case-18 | pass→pass | 8,673 | 4,457 | -49% | 1 | 1 | 0% | 1,514 | 2,280 | +51% | 0 | 0 | — |
case-19 | pass→pass | 9,136 | 3,456 | -62% | 1 | 1 | 0% | 1,566 | 2,043 | +30% | 0 | 0 | — |
case-20 | pass→pass | 13,695 | 6,009 | -56% | 1 | 1 | 0% | 2,377 | 2,550 | +7% | 0 | 0 | — |
case-21 | pass→pass | 7,188 | 4,280 | -40% | 1 | 1 | 0% | 1,162 | 2,236 | +92% | 0 | 0 | — |
case-22 | fail→fail | 7,853 | 4,286 | -45% | 1 | 1 | 0% | 1,425 | 2,199 | +54% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted, and 19 counted toward the lift figure. The other 3 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +36 percentage points is the difference between those two pass rates over the 19 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.