Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Vitest API and config reference (Jest-compatible) — mocking with vi.*, spies, fake timers, coverage configuration, fixtures, snapshots, and test filtering. Use for Vitest API and configuration questions anywhere in the monorepo; for Studio-specific test strategy and component-test setup, start with studio-testing and studio-mock-api-tests.
.claude/skills/supabase-vitest/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-15 | ✗→✓ | ▲ Improved | 4% | 0% |
| case-19 | ✗→✓ | ▲ Improved | -39% | 0% |
| case-11 | ✓→✗ | ▼ Worse | 17% | 0% |
| case-01 | ✓→✓ | = Same ✓ | 31% | 0% |
| case-02 | ✓→✓ | = Same ✓ | 145% | 0% |
Vitest is a next-generation testing framework powered by Vite. It provides a Jest-compatible API with native ESM, TypeScript, and JSX support out of the box. Vitest shares the same config, transformers, resolvers, and plugins with your Vite app.
Key Features:
> The skill is based on Vitest 3.x, generated at 2026-01-28.
| Topic | Description | Reference | | ------------- | --------------------------------------------------------------- | -------------------------------------------- | | Configuration | Vitest and Vite config integration, defineConfig usage | core-config | | CLI | Command line interface, commands and options | core-cli | | Test API | test/it function, modifiers like skip, only, concurrent | core-test-api | | Describe API | describe/suite for grouping tests and nested suites | core-describe | | Expect API | Assertions with toBe, toEqual, matchers and asymmetric matchers | core-expect | | Hooks | beforeEach, afterEach, beforeAll, afterAll, aroundEach | core-hooks |
| Topic | Description | Reference | | ------------ | -------------------------------------------------------------- | ---------------------------------------------------------- | | Mocking | Mock functions, modules, timers, dates with vi utilities | features-mocking | | Snapshots | Snapshot testing with toMatchSnapshot and inline snapshots | features-snapshots | | Coverage | Code coverage with V8 or Istanbul providers | features-coverage | | Test Context | Test fixtures, context.expect, test.extend for custom fixtures | features-context | | Concurrency | Concurrent tests, parallel execution, sharding | features-concurrency | | Filtering | Filter tests by name, file patterns, tags | features-filtering |
| Topic | Description | Reference | | ------------ | ------------------------------------------------------- | ------------------------------------------------------------ | | Vi Utilities | vi helper: mock, spyOn, fake timers, hoisted, waitFor | advanced-vi | | Environments | Test environments: node, jsdom, happy-dom, custom | advanced-environments | | Type Testing | Type-level testing with expectTypeOf and assertType | advanced-type-testing | | Projects | Multi-project workspaces, different configs per project | advanced-projects |
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | pass→pass | 13,001 | 11,629 | -11% | 1 | 1 | 0% | 2,383 | 3,122 | +31% | 0 | 0 | — |
case-02 | pass→pass | 4,054 | 5,800 | +43% | 1 | 1 | 0% | 604 | 1,482 | +145% | 0 | 0 | — |
case-03 | pass→pass | 6,446 | 6,827 | +6% | 1 | 1 | 0% | 1,080 | 1,790 | +66% | 0 | 0 | — |
case-04 | pass→pass | 14,377 | 9,780 | -32% | 1 | 1 | 0% | 2,250 | 2,575 | +14% | 0 | 0 | — |
case-05 | pass→pass | 6,927 | 6,166 | -11% | 1 | 1 | 0% | 817 | 1,699 | +108% | 0 | 0 | — |
case-06 | pass→pass | 11,196 | 8,842 | -21% | 1 | 1 | 0% | 1,970 | 2,278 | +16% | 0 | 0 | — |
case-07 | pass→pass | 7,278 | 5,610 | -23% | 1 | 1 | 0% | 1,063 | 1,625 | +53% | 0 | 0 | — |
case-08 | pass→pass | 11,202 | 10,018 | -11% | 1 | 1 | 0% | 1,865 | 2,551 | +37% | 0 | 0 | — |
case-09 | pass→pass | 9,346 | 7,694 | -18% | 1 | 1 | 0% | 1,640 | 2,047 | +25% | 0 | 0 | — |
case-10 | pass→pass | 14,135 | 11,644 | -18% | 1 | 1 | 0% | 2,182 | 2,586 | +19% | 0 | 0 | — |
case-11 | pass→fail | 13,487 | 11,670 | -13% | 1 | 1 | 0% | 2,571 | 3,002 | +17% | 0 | 0 | — |
case-12 | pass→pass | 9,184 | 4,443 | -52% | 1 | 1 | 0% | 1,387 | 1,525 | +10% | 0 | 0 | — |
case-13 | pass→pass | 5,108 | 5,784 | +13% | 1 | 1 | 0% | 854 | 1,568 | +84% | 0 | 0 | — |
case-14 | pass→pass | 9,758 | 8,426 | -14% | 1 | 1 | 0% | 1,536 | 2,090 | +36% | 0 | 0 | — |
case-15 | fail→pass | 9,866 | 6,937 | -30% | 1 | 1 | 0% | 1,828 | 1,909 | +4% | 0 | 0 | — |
case-16 | pass→pass | 14,057 | 9,901 | -30% | 1 | 1 | 0% | 2,405 | 2,709 | +13% | 0 | 0 | — |
case-17 | pass→pass | 6,296 | 6,038 | -4% | 1 | 1 | 0% | 997 | 1,783 | +79% | 0 | 0 | — |
case-18 | pass→pass | 5,403 | 6,468 | +20% | 1 | 1 | 0% | 883 | 1,641 | +86% | 0 | 0 | — |
case-19 | fail→pass | 22,126 | 9,127 | -59% | 1 | 1 | 0% | 3,487 | 2,135 | -39% | 0 | 0 | — |
case-20 | pass→pass | 7,600 | 13,677 | +80% | 1 | 1 | 0% | 1,216 | 1,860 | +53% | 0 | 0 | — |
case-21 | pass→pass | 8,757 | 9,085 | +4% | 1 | 1 | 0% | 1,402 | 2,159 | +54% | 0 | 0 | — |
case-22 | pass→pass | 15,411 | 12,265 | -20% | 1 | 1 | 0% | 2,500 | 2,389 | -4% | 0 | 0 | — |
case-23 | pass→pass | 8,456 | 6,444 | -24% | 1 | 1 | 0% | 1,462 | 1,860 | +27% | 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. 23 cases were attempted. The headline lift of 0 percentage points is the difference between those two pass rates over the 23 comparable cases. 1 case got worse with the skill loaded, and it is included in that figure.
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.