@testing-library/jest-dom provides custom Jest matchers for asserting the state of DOM elements in your tests. It helps make DOM-related assertions more declarative and readable by extending Jest’s `expect`, and it supports use with different setup options such as Jest and Vitest.
Project status
- testing-library/jest-dom appears actively maintained, with a very recent upstream push on 2026-06-11 and subsequent change activity across 2025 (multiple tagged updates up through 6.9.1 on 2025-10-01).
- The apparent update cadence is roughly monthly to biweekly during mid-to-late 2025 (for example, 6.6.4 in 2025-07-26, 6.7.0 in 2025-08-13, 6.8.0 in 2025-08-20, 6.9.0 in 2025-09-30, 6.9.1 in 2025-10-01), suggesting an ongoing feature and fix stream rather than a one-off release cycle.
AI summary generated
Recent updates
v6.9.1
v6.9.1 includes a fix intended to prevent a runtime error when the global `Node` object is undefined in Node.js environments. The code updates how document position constants are referenced, and it also makes small Jest configuration adjustments for the jsdom and node test setups.
v6.9.0
v6.9.0 adds two new DOM-order matchers, .toAppearBefore and .toAppearAfter, for asserting relative position in the DOM tree. The implementation is based on Node.compareDocumentPosition and includes corresponding TypeScript typings, Jest exports, tests, and README documentation.
Featuresv6.8.0
v6.8.0 adds a new Jest DOM matcher, `toBePartiallyPressed`, for checking ARIA `aria-pressed="mixed"` on pressable elements. The release notes only call out this new matcher, and the code diff confirms the matcher was added with TypeScript types, runtime implementation, tests, and README documentation.
Featuresv6.7.0
Release v6.7.0 adds the new `.toBePressed()` matcher for asserting `aria-pressed` state on button-like elements. In addition to the documented matcher addition, the codebase also includes internal refactors to how several other matchers compare values.
Featuresv6.6.4
v6.6.4 is a small release focused on a performance-oriented dependency swap. The release notes only call out replacing chalk with picocolors.
v6.6.3
v6.6.3 includes a small bug fix related to TypeScript type augmentation for Vitest matchers. The release primarily ensures the Vitest module is imported so the matcher extensions are picked up correctly.
v6.6.2
Release v6.6.2 is a small patch focused on TypeScript types for Vitest, specifically removing a recursive type reference. The only other changes are to contributor/credits metadata (all contributors config and README).
v6.6.1
Release v6.6.1 contains a single bug fix related to how lodash is imported in the to-have-selection matcher. The code change adjusts the lodash import specifier in src/to-have-selection.js.
v6.6.0
v6.6.0 adds a new matcher, toHaveSelection, to jest-dom. The release notes only mention the feature, but the code introduces a fully implemented matcher with specific selection behavior for inputs, textareas, and general text nodes, plus accompanying tests and documentation updates.
Featuresv6.5.0
v6.5.0 adds support for asserting aria-valuenow via the toHaveValue matcher for elements with certain ARIA roles. The code also includes additional, non-release-noted changes related to Vitest TypeScript typings and dependency configuration.
Features