"Picking testing tools should take 30 minutes, not three sprints."
The Working Stack (2026)
If you're starting a new web project today, the answer is short:
- Vitest for unit, component, and integration tests.
- React Testing Library (RTL) layered on top of Vitest for component tests.
- MSW for network mocking — works inside Vitest tests and Playwright tests both.
- Playwright for E2E tests.
That's the whole stack. Four packages, two test runners (Vitest + Playwright run in separate processes for different purposes). It's not the only valid stack — but it's the default for a reason, and the rest of this quest assumes it.
What About Jest?
Jest is still excellent software. If you're maintaining a large project that already runs on Jest, the migration cost to Vitest may not be worth it — Vitest's API is mostly Jest-compatible by design, but config quirks and edge cases catch you. For new projects, though, Vitest wins on three axes:
- Speed: Vitest reuses Vite's transform pipeline. First test runs in seconds; subsequent runs are sub-second.
- ESM-native: Jest's CommonJS heritage makes modern ESM modules awkward. Vitest is ESM-first.
- Same toolchain as your app: if you already use Vite (and Next.js, Remix, SvelteKit, Astro all use Vite or Vite-like tools), Vitest reuses your config.
What About Cypress?
Cypress is still a fine tool. It pioneered a lot of modern E2E ergonomics — auto-wait, time-travel debugging, dev-time UI. But Playwright has matched or exceeded those features over the last three years and added cross-browser real testing (Chromium + Firefox + WebKit) where Cypress runs only on Chromium-family browsers. If you have a Cypress suite that works, keep it. If you're choosing fresh, Playwright is the answer.
The Decision in Three Questions
- New project, no existing tests? Vitest + Playwright. Done.
- Existing Jest suite, considering migration? Estimate the cost. If the suite is small or you're already rewriting half of it, migrate. If it's huge and stable, stay on Jest — both will be supported for years.
- Existing Cypress suite? Migrate only if you need cross-browser coverage or you're hitting Cypress-specific friction. Otherwise stay.
What Each Tool Is NOT
Vitest isn't a browser. It runs in Node with a DOM emulator (happy-dom or jsdom). Real CSS, real layout, real network — that's Playwright. Playwright isn't a fast inner loop. A Playwright test that takes 3 seconds is 50× slower than a Vitest test that takes 60 ms. The two tools live on opposite ends of the speed/fidelity axis on purpose. Don't try to make Vitest test layout, and don't try to make Playwright your every-save runner.