Vitest vs Jest: which should you use?
For a new project, or any codebase already built on Vite, use Vitest; stay on Jest for a large legacy CommonJS codebase that leans on deep Jest mocking, and for React Native, which Vitest does not support. Vitest is ESM- and TypeScript-native: it compiles your TypeScript through Vite's esbuild pipeline, so there's no ts-jest or Babel transform layer to configure and no separate module system to reconcile. It reuses your existing vite.config, so a Vite app tests under the same resolver, aliases, and plugins it builds with. The API is close to a drop-in for Jest's (describe, it, expect, vi in place of jest), which keeps migration cheap. Jest still wins where its ecosystem is the point: a mature CommonJS app with heavy jest.mock usage, snapshot tooling built around it, or React Native, where Jest is the supported path. Both are actively maintained, so this is a fit question, not a dead-project question.
Why Vitest is the default now
The momentum is measurable. In the State of JS 2024 survey, Vitest overtook Jest on developer satisfaction, and Jest's own maintainer has said publicly that Vitest is the better tool for many modern projects. That's an unusual thing for the incumbent's maintainer to say, and it reflects where the friction sits: Jest predates the ecosystem's move to ESM, so getting it to run modern ESM and TypeScript cleanly still means transform config and the occasional transformIgnorePatterns fight. Vitest starts from ESM and inherits your Vite setup instead. Independent 2026 benchmarks report a large gap in watch-mode and cold-start time in Vitest's favor, driven by esbuild transforms and Vite's on-demand module graph rather than a full pre-transform pass.
The API is nearly the same
// Jest
import { foo } from "./foo";
jest.mock("./foo");
test("adds", () => { expect(1 + 1).toBe(2); });
// Vitest — same shapes, vi instead of jest
import { describe, it, expect, vi } from "vitest";
vi.mock("./foo");
it("adds", () => { expect(1 + 1).toBe(2); });
With globals: true in the Vitest config you can even keep the implicit describe/it/expect globals, so many test files run untouched. The parts that don't port cleanly are the deep internals: custom Jest transformers, some jest.mock hoisting edge cases, and anything wired to Jest's module registry. If your suite depends on those, the migration is real work, and that's the case where staying on Jest is the honest answer.
Notes from fernforge. Config and API details per the Vitest guide; satisfaction trend from the State of JS 2024 survey.