Skip to content
Agents tracked: 506 Releases (7d): 634 Agent status: 4 with issuesSince last limit reset: Claude 15d · Codex 0d For AI agents: Markdown Updated Nov 26, 2026

Jest

Delightful JavaScript testing framework with minimal configuration.

TestingNPM

GitHubWebsite

1. License

License from npm.

github.com/jestjs/jest

From the package registry and GitHub, checked daily. Tap a verdict to see its source.How we checkedReport an error

What Jest does

Jest's own site makes speed its main argument: it says each test runs in its own process so tests can run in parallel, failed tests run first, and the README adds a watch mode that only reruns tests tied to changed files.

Jest popularity

86 / 100
Gid Score, #39 overall
63.2M
downloads a week, npm
45.5K
GitHub stars
396
agent projects use it
Jest: downloads per weeknpm, jest 63,211,142
Jest: GitHub starsjestjs/jest 45,478

Gid Score measures public popularity and activity, not quality. How the Gid Score is calculated

How Jest is used

  • Jest is a dependency in 396 of the 6,258 public GitHub projects set up for AI coding agents that we scanned (8.1% of the 4,867 JavaScript/TypeScript ones), #5 of 122 in testing.
  • Counting the projects our scan samples by dependency (Solana 3,067, Ethereum and EVM 1,774, 3D and games 3,130, agent frameworks and SDKs 13,750), it appears in 1,123; those are left out of every share on this page.
  • The most used alternative in our scan is Vitest (1,312 projects).
  • Projects that use it most often also use Testing Library (44.7%), ESLint (77.5%), TypeScript (86.9%).
  • It is more common in projects set up for Devin Desktop (14.3%) than for GitHub Copilot (5.7%).

By coding agent

235 projects, 9.6%
201 projects, 6.1%
172 projects, 5.7%
42 projects, 8.9%
40 projects, 14.3%
31 projects, 6.6%
21 projects, 6.1%
20 projects, 14.3%

Often used with

In 44.7% of its projects
In 77.5% of its projects
In 86.9% of its projects
In 53.0% of its projects
In 33.1% of its projects
In 58.1% of its projects
In 25.5% of its projects
In 20.7% of its projects

Jest in practice

Strengths

Parallel runs, failed tests first (site's claim)

The site says tests are parallelized by running them in their own processes. It says unique global state per test lets Jest run them in parallel reliably. It also says Jest runs previously failed tests first and reorders runs by how long each test file takes.

Watch mode scoped to changed files

The README says the interactive watch mode "only runs test files related to changed files."

Snapshots beside the test or inline

The site says snapshot tests track large objects. It says the snapshots can sit alongside your tests or be embedded inline in them.

Import mocking via a custom resolver

The site says Jest resolves imports in tests with its own resolver. It says this makes it simple to mock any object outside the test's scope, and that the Mock Functions API can spy on calls.

Watch out for

Vite: unsupported per the docs, "not fully" per the README

The Getting Started docs say Jest is not supported by Vite because of the Vite plugin system. They say the <code>vite-jest</code> examples are "not compatible with versions of Vite later than 2.4.2" and name Vitest as one alternative. The README uses softer wording: "not fully supported".

Babel path skips type-checking

With <code>@babel/preset-typescript</code>, TypeScript is only transpiled, so Jest does not type-check tests as they run. For type checks, the docs point to <code>ts-jest</code> or running <code>tsc</code> separately.

<code>@types/jest</code> is third-party and can lag

The docs note that <code>@types/jest</code> is maintained at DefinitelyTyped. They warn the latest Jest features or versions may not be covered yet. <code>@jest/globals</code> ships with Jest and updates with it.

The README's first test (sum.test.js)

const sum = require('./sum');

test('adds 1 + 2 to equal 3', () => {
  expect(sum(1, 2)).toBe(3);
});

More about Jest

Funding
  • Open Collective: https://opencollective.com/jest

See all

Head to head
Packages around it
  • ts-jest: TypeScript preprocessor for Jest
  • jest-environment-jsdom: jsdom test environment
  • babel-jest: Babel transform, installed with Jest
  • jest-environment-node: Node test environment
  • jest-expo: Jest preset for Expo
  • jest-util: Jest internal utilities
More in Testing

Alternatives

Jest This page

MITGid 8663.2M/wk

Vitest

Next-generation testing framework powered by Vite with native ESM.

MITGid 86194M/wk

Compare Jest with another tool

Get started

Install it.

npm install jest

Rules for your agent

Paste into AGENTS.md or CLAUDE.md
## Jest
- Install Jest as a dev dependency (`npm install --save-dev jest`) and run it through a `"test": "jest"` script in `package.json`.
- In test files, import `describe`, `expect`, `test` and other helpers from `@jest/globals`. The docs say this lets ESLint work without extra config and avoids `no-undef` errors.
- If the project uses `@types/jest` instead, match its version to Jest (the docs' example: Jest 27.4.0 → `@types/jest` 27.4.x).
- When TypeScript goes through `@babel/preset-typescript`, do not count on Jest to catch type errors. Use `ts-jest` or run `tsc` separately.
- Any Babel config makes `babel-jest` transform files. Set `transform: {}` in `jest.config.js` if that is not wanted.
- Before adding Jest to a Vite project, check the limits. The docs say it is not supported by Vite and `vite-jest` is not compatible with Vite later than 2.4.2. The README says "not fully supported". The docs name Vitest as one alternative.