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.
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.
- dependents repos: Over 1M dependent repos
- github commitsLastYear: Low activity: 8 commits
- main.vitest.dev/guide/browser/component-testing: Vitest's preferred alternative for React components
- pkgpulse.com/guides/state-of-javascript-testing-2026: Still the React testing standard in 2026
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.
- nextjs.org/docs/app/guides/testing/vitest: Documents the combined setup and recommends end-to-end tests for async Server Components
- vitest.dev/guide/browser/component-testing: Vitest provides its own React renderer for real-browser tests
- playwright.dev/docs/intro: Playwright provides a full browser test runner
- product.hubspot.com/blog/migrated-from-enzyme-to-react-testing-library: HubSpot completed adoption across its frontend teams
- github commitsLastYear, releasesLastYear: Eight commits and three patch releases in a year
- github.com/testing-library/react-testing-library/issues/1385: Open report on async rendering with React 19
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.
- github description: React DOM testing utilities only
- pkgpulse.com/guides/state-of-javascript-testing-2026: Recommended as the default for component tests alongside Vitest
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.
- 2025.stateofreact.com/en-US/other-tools: 1,381 respondents chose Testing Library for React app testing
- github.com/testing-library/react-testing-library/blob/v16.3.3/package.json: React and React DOM 18 or 19 are peer dependencies
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.
- pkgpulse.com/guides/state-of-javascript-testing-2026: Fires JS events, not real clicks; misses CSS and layout bugs
- github.com/testing-library/react-testing-library/releases: React 19 support and act() fixes in recent releases
- npm hasTypes: Ships TypeScript types
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.
- testing-library.com/docs/react-testing-library/api: Documents rendering, wrappers, cleanup, and hook testing
- testing-library.com/docs/dom-testing-library/api-debugging: Failed queries print the DOM under test
- medium.com/airbnb-engineering/accelerating-large-scale-test-migration-with-llms-9565c208023b: Airbnb migrated nearly 3,500 test files with LLM assistance
- sigh.dev/posts/making-react-testing-library-faster: Profiling a Sentry test traced significant overhead to jsdom
- github.com/testing-library/react-testing-library/issues/1375: Users report changed Suspense behavior after upgrading to React 19
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.
- github commitsLastYear: 8 commits in the last year
- scorecard Maintained: Maintained check scores 0
- main.vitest.dev/guide/browser/component-testing: Vitest docs prefer vitest-browser-react; Testing Library is a fallback
- github.com/testing-library/react-testing-library/releases: v16.3.1 to v16.3.3 between Dec 2025 and Aug 2026
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.
- github commitsLastYear, releasesLastYear, openPullRequests: Eight commits, three releases, and 23 open pull requests
- peers commitsLastYear: Vitest had 1,294 commits and Jest had 264
- github.com/testing-library/react-testing-library/releases: Recent patches addressed typing and React event handling
- github.com/testing-library/react-testing-library/pulls: Async act() and renderAsync proposals are still open
- react.dev/warnings/react-test-renderer: React recommends the library as a replacement for its test renderer
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.
- hackerNews top: The New York Times migrated from Enzyme to React Testing Library
- pkgpulse.com/guides/state-of-javascript-testing-2026: Called the React testing standard in 2026
- 2025.stateofjs.com/en-US/libraries/testing: Survey covers testing tools; Testing Library not among the top pain points
- scrimba.com/articles/how-to-test-react-apps-2026: 2026 React testing guide that features RTL
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.
- product.hubspot.com/blog/migrated-from-enzyme-to-react-testing-library: HubSpot made it its standard UI testing library
- medium.com/airbnb-engineering/accelerating-large-scale-test-migration-with-llms-9565c208023b: Airbnb reports a large-scale migration to the library
- sigh.dev/posts/making-react-testing-library-faster: Independent benchmark uses a real Sentry test
- react.dev/warnings/react-test-renderer: React recommends it in its test renderer deprecation guidance
- nextjs.org/docs/app/guides/testing/vitest: Next.js documents a working Vitest setup
- 2025.stateofjs.com/en-US/libraries: 89% satisfaction for Testing Library across adapters
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.
- advisories total: 0 advisories
- npm dependencies: 1 dependency
- scorecard score: 3.7, with Security-Policy, Pinned-Dependencies and Token-Permissions at 0
- github.com/testing-library/react-testing-library/releases: v16.3.1 switched to trusted publishing
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.
- npm license, dependencies: MIT licence and one direct dependency
- advisories total, last24Months: Zero advisories in the OSV snapshot
- scorecard score, checks: 3.7 overall with zeroes for pinning, token permissions, and security policy
- github.com/testing-library/react-testing-library/blob/v16.3.3/package.json: Babel runtime is the direct dependency, with separate peer requirements
- github.com/testing-library/react-testing-library/pull/1437: Switched the release workflow to npm trusted publishing
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
- 8.9Playwright
- 8.9Vitest
- 7.8React Testing Library
- 6.7Jest
- 6.6WebdriverIO
- 6.4Cypress
- 6.0Mocha
- 5.4AVA
- 5.1Jasmine
- 5.0Node Tap