testing-library/react-testing-library
🐐 Simple and complete React DOM testing utilities that encourage good testing practices. observed · 2026-08-28
Health v2 · maintenance only
73/100
- Activity 75
- Release rhythm 54
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-02. Adoption (stars, forks) is never an input.
- gap_med: 58.5
- age_days: 3089
- days_rel: 226
- days_push: 153
- n_releases_24m: 5
Adoption not part of the score
19645 stars · 1167 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-29, confidence not recorded
React Testing Library is a lightweight set of utilities for testing React components by rendering them into a DOM and querying them the way a user would. It encourages tests that avoid implementation details, making test suites resilient to refactoring.
Use cases
- test react components
- write maintainable ui tests that survive refactors
- query dom elements by label or role like a user would
- simulate user interactions in component tests
- migrate from enzyme to a modern testing approach
- test react hooks with renderHook
- improve accessibility by testing with semantic queries
When to choose
- you write React component tests with Jest, Vitest, or another test runner
- you want user-centric tests that don't depend on component internals
- you want to encourage accessible markup via role- and label-based queries
When to avoid
- you need end-to-end tests in a real browser (use Playwright or Cypress)
- you need to assert on component state, props, or lifecycle methods directly
- you are testing non-React frameworks (use the framework-specific Testing Library wrapper)
Facets
library · maturity stable
testing e2e-testing ui-components testing frontend web-development developer-tools browser cross-platform react dom-testing user-centric-testing jest accessibility-testing unit-testing nodejs
10 sources
- readme: https://github.com/testing-library/react-testing-library · fetched 2026-08-28 · d24a342400ff
- homepage: https://testing-library.com/react · fetched 2026-08-29 · 6cbad718f3ab
- site_page: https://testing-library.com/docs/react-testing-library/migrate-from-enzyme · fetched 2026-08-29 · 8a7a50993c53
- site_page: https://testing-library.com/docs · fetched 2026-08-29 · 294680c6ca00
- site_page: https://testing-library.com/docs/recipes · fetched 2026-08-29 · e707259ba080
- site_page: https://testing-library.com/docs/queries/about · fetched 2026-08-29 · 1bb7d31eef5f
- site_page: https://testing-library.com/docs/dom-testing-library/intro · fetched 2026-08-29 · 273a42fd0eae
- site_page: https://testing-library.com/docs/react-testing-library/example-intro · fetched 2026-08-29 · f66b3a236a0e
- site_page: https://testing-library.com/docs/react-testing-library/setup · fetched 2026-08-29 · 67bfcb205775
- site_page: https://testing-library.com/docs/react-testing-library/api · fetched 2026-08-29 · 098799db6085
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| testing-library/react-testing-library | main | 73 |
For agents
markdown · JSON · MCP: product_card(name="testing-library/react-testing-library")
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem