Testing and quality · Tool

Jest

A long-established JavaScript test runner, originally from Meta, with mocking, snapshots and coverage built in, used by a very large number of existing projects.

Test runners · Open source · updated

How it works

Jest bundles everything in one package: a runner that executes test files in parallel, the expect assertion library, jest.fn() mocks and module mocking, fake timers, snapshot testing and code coverage. Tests usually run in Node.js or in jsdom, a simulated browser, which is how React components are commonly tested with Testing Library.

It came out of Meta (Facebook) and has been looked after by the OpenJS Foundation since 2022. It remains the default in React Native and in many established React and Node.js projects. Its weak spots are modern ones: TypeScript needs a transformer such as ts-jest, Babel or SWC, and native ES module support is still marked experimental, which is a large part of why new Vite projects pick Vitest.

Jest pros and cons

Pros

  • Everything built in: runner, assertions, mocks, snapshots and coverage
  • Mature, with answers online for almost any problem
  • The standard in React Native and many existing codebases

Cons

  • TypeScript and ES modules need extra configuration
  • Slower start-up and watch mode than Vitest in many projects
  • jsdom is a simulation, so some browser behaviour differs

When to use Jest

Pick it when

  • React Native apps
  • Existing projects that already run on Jest
  • Node.js libraries written in CommonJS

Skip it when

  • New Vite-based projects, where Vitest fits with less setup

Jest pricing

Open source

Free (MIT).

Approximate, checked September 2026.What the other tools cost

Jest vs the alternatives

More in Testing and quality

Test runners

All 10 Testing and quality terms

Crafted in the dark. Shipped to the world.

Tell us what you are building. You get a private project space with a proposal and a line-by-line quote within a day.