testing-library/jest-dom
:owl: Custom jest matchers to test the state of the DOM observed · 2026-08-28
Health v2 · maintenance only
97/100
- Activity 96
- Release rhythm 96
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-03. Adoption (stars, forks) is never an input.
- gap_med: 13
- age_days: 3068
- days_rel: 24
- days_push: 24
- n_releases_24m: 12
Adoption not part of the score
4597 stars · 420 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-29, confidence not recorded
A companion library for Testing Library that provides custom Jest matchers for asserting the state of DOM elements, such as visibility, attributes, text content, and form values. It extends Jest (and Jest-compatible expect like Vitest) with declarative, readable matchers like toBeInTheDocument and toHaveTextContent.
Use cases
- assert an element is in the document in jest tests
- check if a dom element is visible or disabled
- test form input values in react components
- assert element has a css class or attribute
- verify accessible name and role of elements
- write readable dom assertions with vitest
When to choose
- you use Jest or Vitest to test web UIs with a DOM
- you want declarative, user-centric DOM assertions alongside Testing Library
- you test React, Vue, or Angular components and need readable failure messages
When to avoid
- you are not testing DOM-based UIs (e.g. Node-only or React Native without DOM)
- you use a test runner with an incompatible expect implementation
- you need a full test framework or runner rather than assertion matchers
Facets
library · maturity stable
testing e2e-testing testing web-development frontend developer-tools browser jest jest-matchers dom jsdom vitest testing-library assertions ui-testing nodejs javascript
10 sources
- readme: https://github.com/testing-library/jest-dom · fetched 2026-08-28 · 2b75a5415e87
- homepage: https://testing-library.com/docs/ecosystem-jest-dom · fetched 2026-08-29 · e14933d910f6
- 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/user-event/intro · fetched 2026-08-29 · 8e6b835ab312
- site_page: https://testing-library.com/docs/ecosystem-bs-jest-dom · fetched 2026-08-29 · a2d6923cbcf7
- site_page: https://testing-library.com/docs/ecosystem-react-select-event · fetched 2026-08-29 · db59eb8c5f7f
- site_page: https://testing-library.com/docs/ecosystem-eslint-plugin-testing-library · fetched 2026-08-29 · 365f4acca6a1
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| testing-library/jest-dom | main | 97 |
For agents
markdown · JSON · MCP: product_card(name="testing-library/jest-dom")
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem