Elestia Open Source Ratings
7.8

React Testing Library

A strong pick. 3rd of 10 testing tools.

React Testing Library is the standard way to render React components in tests and query them the way a user would. It runs on top of Jest or Vitest with jsdom. It is still a strong, safe pick for React projects, but development is now slow, and Vitest's Browser Mode with vitest-browser-react is becoming the recommended alternative for new setups.

Best for: React teams that write component tests on Jest or Vitest with jsdom and want the most widely known, user-centred query API.

WebsiteGitHubnpm

Scores

Overall7.8

How strongly do we recommend it for a new project today?

Claude Opus 5.5: 7.5, likely 6.5 to 8.5

It is still the best-known and best-supported way to write React component tests on Jest or Vitest with jsdom, and it is safe and stable. Slow maintenance, and Vitest's move towards its own browser-mode React package, keep it below the top of the category. It is also only a companion to a test runner, not a runner itself.

GPT-6.2 Sol: 8.1, likely 6.9 to 9.0

For a new React web app, React Testing Library is a strong companion to Vitest or Jest for component tests built around user behavior. Vitest's browser mode has its own React renderer for teams that want real-browser component tests, and Playwright is a better fit for end-to-end flows. Proven use on large codebases supports the recommendation, while slow maintenance and unresolved React 19 async issues make the two-year outlook less certain.

Needed by many5.8

How many developers need a tool for this job?

Claude Opus 5.5: 6.0, likely 5.0 to 7.0

Most React developers need component tests, and React is the largest front-end framework. Still, the library serves only React and only the component layer, not unit tests in general or end-to-end tests. That makes it narrower than the test runners in its category.

GPT-6.2 Sol: 5.5, likely 4.4 to 6.6

Most JavaScript and TypeScript teams need testing, and React web apps give this package a substantial audience. Its scope is React DOM component tests, so back-end unit tests, other UI frameworks, and full browser workflows call for other tools. In the 2025 State of React survey, 1,381 of 2,625 people who answered the testing question selected Testing Library, which gives a better view of React teams than of JavaScript developers overall.

Helps a lot8.2

How well does it do the job for those who need it?

Claude Opus 5.5: 8.0, likely 7.0 to 9.0

The query API (getByRole, getByLabelText, findBy) does its job very well and is widely seen as the right way to test React components. It ships types, is well documented, and AI agents write correct code for it reliably. Its limits are that it depends on jsdom's simulation unless you pair it with a real browser, and that async act() handling sometimes confuses users.

GPT-6.2 Sol: 8.4, likely 7.2 to 9.2

Version 16.3.3 pairs typed rendering and hook helpers with documented role and label queries and DOM output on query failures. Airbnb showed that AI agents can migrate component tests to this API at scale, though that case gives limited evidence about writing new tests. Performance varies with the DOM environment, and users still report awkward React 19 Suspense timing.

Holds up over time6.3

Will it still be a good choice in two years?

Claude Opus 5.5: 6.0, likely 4.5 to 7.5

The library is mature and stable, and it still gets patch releases: three in the last year, the latest in August 2026. But it had only 8 commits last year and a Scorecard Maintained score of 0. Vitest is steering React users towards its own vitest-browser-react package. The range is wide because the library can stay useful in maintenance mode for a long time, yet the ecosystem may slowly move away from it.

GPT-6.2 Sol: 6.5, likely 4.9 to 7.9

The project shipped three releases on eight commits in the past year, including fixes for React 19 types and event handling. Activity is well below Vitest and Jest, and an async act() pull request dating to 2023 is still open. React's recommendation supports continued use, while the number of people who can ship releases and the funding available for maintenance remain unclear.

Used widely9.0

How many use it, and is that growing?

Claude Opus 5.5: 9.0, likely 8.0 to 9.5

It has about 376M downloads in 4 weeks and over a million dependent repositories, more than any peer except Jest. Its download ratio of about 5.2 beats the median of 4.1, so it is still gaining ground, though part of that comes from React project templates that install it by default. Little discussion on Bluesky and Hacker News reflects its maturity, not low use.

  • npm downloadsLast4Weeks: 375.9M, against 72.2M a year ago (ratio about 5.2)
  • dependents repos: 1,052,404 repositories and 43,775 packages
  • medianDownloadsRatio: Median ratio 4.1, below this project's ratio

GPT-6.2 Sol: 8.9, likely 7.5 to 9.8

Ecosyste.ms found 1.05 million dependent repositories and about 43,800 dependent packages, with only Jest ahead on repository count among the supplied peers. Four-week downloads rose 5.2-fold against the catalog median of 4.1, while Vitest and Playwright grew faster. Repeated CI installs and historical starter-template inclusion make downloads a poor count of deliberate choices, and the low Bluesky activity gives little additional evidence about new adoption.

  • dependents repos, packages: 1,052,404 repositories and 43,775 packages
  • npm downloadsLast4Weeks, downloadsSame4WeeksYearAgo, medianDownloadsRatio: 376 million versus 72 million, or 5.2-fold against 4.1-fold
  • peers dependentRepos, downloadsLast4Weeks, downloadsSame4WeeksYearAgo: Jest leads on dependent repositories, and Vitest and Playwright grew faster
  • bluesky posts: Two repository links in 24 months
  • github.com/react/create-react-app/blob/main/packages/cra-template/template.json: The Create React App starter includes the package by default
Vouched for8.4

Who stands behind it being good?

Claude Opus 5.5: 8.0, likely 7.0 to 9.0

Large organisations rely on it; the New York Times, for example, migrated to it from Enzyme. It is the default in React's ecosystem, and independent 2026 guides name it the React testing standard. State of JS has long rated Testing Library highly for satisfaction, though recent per-tool numbers were not easy to confirm.

GPT-6.2 Sol: 8.8, likely 7.8 to 9.8

HubSpot completed its migration in 2025, Airbnb migrated nearly 3,500 test files, and a 2026 Sentry write-up profiles the library in a real test suite. React recommends it, and Next.js documents a setup with Vitest. State of JavaScript 2025 reports 89% satisfaction for the wider Testing Library family, so that figure gives only an approximate view of this React package.

Safe7.5

How safe is it to depend on?

Claude Opus 5.5: 8.0, likely 7.0 to 9.0

It has no known advisories, one runtime dependency (with @testing-library/dom as a peer), an MIT licence, and releases published through trusted publishing since December 2025. It is usually a dev dependency only. The Scorecard is weak at 3.7: it has no security policy, unpinned dependencies, and broad token permissions.

GPT-6.2 Sol: 6.9, likely 5.5 to 8.2

The MIT-licensed package has one direct dependency, plus its React and DOM Testing Library peers, and OSV lists zero advisories for the package itself. Releases use npm trusted publishing through GitHub Actions. The 3.7 OpenSSF Scorecard flags weak dependency pinning, token permissions, and security policy checks, and the number of people with release access is unclear.

Good

  • Its role-based and label-based queries push tests towards accessible, user-facing behaviour, not implementation details.
  • It is used almost everywhere in React projects, so docs, answers and AI-generated test code for it are plentiful and usually correct.
  • The API is stable: tests written years ago still pass with few changes, and React 19 is supported.
  • It has a tiny attack surface: one dependency, no advisories, an MIT licence and trusted publishing.

Bad

  • It only serves React, and it is not a test runner: you still need Jest or Vitest plus a DOM environment.
  • Under jsdom it fires synthetic events, so it misses CSS, layout and real-browser bugs.
  • Development has slowed to a few commits and patch releases a year.
  • Vitest's docs now point React users to vitest-browser-react and treat Testing Library as a fallback or migration path.

The numbers

npm downloads, 4 weeks
376M ×5.2 in a year
GitHub stars
20k
Commits, 12 months
8
npm version
16.3.3 Aug 2026
Versions, 12 months
3
Advisories, 24 months
0 of 0 ever
OpenSSF Scorecard
3.7 out of 10, Nov 2026
Licence
MIT

Read on 21 November 2026 from GitHub (testing-library/react-testing-library), npm (@testing-library/react), OSV and the OpenSSF Scorecard.

Testing tools

  1. 8.9Playwright
  2. 8.9Vitest
  3. 7.8React Testing Library
  4. 6.7Jest
  5. 6.6WebdriverIO
  6. 6.4Cypress
  7. 6.0Mocha
  8. 5.4AVA
  9. 5.1Jasmine
  10. 5.0Node Tap
Compare all 10 on six scores