You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Evaluate whether switching from Jest to Vitest would provide meaningful speed, DX, or CI advantages in this repository.
Context
Current test setup: Jest (ts-jest) for unit tests, Playwright for visual tests, run via npm scripts.
Recent changes (PR chore: Configure Renovate #50): Renovate config, dependency pinning, no changes to test approach.
Project type: Node.js CLI (not a Vite/web app). Jest is common here; Vitest is compelling mainly for Vite/modern ESM/TS projects or exceptional startup/watch speed.
Tasks
Benchmark current Jest test runs (local, watch, hooks, CI)
Add Vitest to a vitest-spike branch, port a representative unit test
Run and compare:
Full suite cold and warm runs
Single test-file runs
Watch-mode feedback after edits
Pre-commit hook (if applicable)
CI workflow/test job durations
Config and mocking compatibility
Document results: record medians (not single runs), config complexity, and migration risks/benefits
Recommend keeping Jest or migrating to Vitest based on results
How to Benchmark (exclude benchmarking or migration work for current branch, this must be tracked as a separate issue)
In a vitest-spike branch, keep Jest alongside Vitest
This issue is based on an in-depth review of current CI/test config, goals, and peer repo/test runner tradeoffs.
Note: All benchmarking, migration, and analysis work related to new branches should be tracked in a separate issue for clarity and parallel progress. This issue is for global planning, not implementation steps tied to any single branch.
Summary
Evaluate whether switching from Jest to Vitest would provide meaningful speed, DX, or CI advantages in this repository.
Context
ts-jest) for unit tests, Playwright for visual tests, run via npm scripts.Tasks
vitest-spikebranch, port a representative unit testHow to Benchmark (exclude benchmarking or migration work for current branch, this must be tracked as a separate issue)
In a
vitest-spikebranch, keep Jest alongside VitestAdd scripts:
{ "test:unit": "jest --runInBand", "test:unit:vitest": "vitest run", "test:unit:vitest:watch": "vitest" }Port 1–2 typical unit tests to Vitest
For both runners:
time npm run test:unithyperfine --warmup 2 ...if available, or manual 3–5 runs and record averagesFill out this results table and add any migration issues:
Decision Criteria
References
This issue is based on an in-depth review of current CI/test config, goals, and peer repo/test runner tradeoffs.
Note: All benchmarking, migration, and analysis work related to new branches should be tracked in a separate issue for clarity and parallel progress. This issue is for global planning, not implementation steps tied to any single branch.