Back to Explore

testing-library/dom-testing-library

GitHub
1 watchersOpen source

Last release: 10 months ago

DOM Testing Library is a lightweight set of DOM testing utilities for JavaScript. It helps you write maintainable tests for web UI by querying DOM nodes in a way that resembles how users find elements on the page, and it can work with simulated DOM environments like JSDOM (including Jest) or in the browser.

Project status

  • The repo appears actively maintained, with a recent upstream push on 2025-11-12 and a tagged update as recent as 2025-07-27 (v10.4.1).
  • The update cadence looks relatively infrequent, with updates spaced roughly about a year apart (v10.4.0 on 2024-07-22, v10.4.1 on 2025-07-27).

AI summary generated Today

AI-generated from public sources. May be inaccurate. Report

Recent updates

  • v10.4.1

    10 months ago

    Release v10.4.1 makes a small dependency-related change by replacing Chalk with Picocolors for rendering the code frame styling. The code diff shows the runtime usage of the dimming function was updated accordingly.

  • v10.4.0

    7/22/2024

    Release v10.4.0 updates prettyDom behavior related to parsing and handling the COLORS environment variable. The documented change is a reduction in caught exceptions within prettyDom, but the actual diff also includes additional environment guards that change behavior in non-Node contexts.

  • v10.3.2

    7/15/2024

    Release v10.3.2 is a small bug fix focused on how dom-testing-library's prettyDOM reads the DEBUG_PRINT_LIMIT environment variable. It improves robustness when running in environments where process exists but process.env may be missing.

  • v10.3.1

    7/5/2024

    v10.3.1 is a small patch release that reverts a prior change related to exception handling in `prettyDom`. The release notes only mention the revert, but the actual diff shows a change to how `process.env.COLORS` is parsed and how the fallback highlight behavior is decided.

  • v10.3.0

    7/2/2024

    v10.3.0 updates `prettyDOM` to reduce caught exceptions when reading the `COLORS` environment variable. The change refactors the internal `shouldHighlight` logic to only parse `COLORS` when it is truthy, and otherwise falls back to Node detection.

  • v10.2.0

    6/24/2024

    Release v10.2.0 adds support for pretty printing custom elements whose classes are anonymous. The implementation updates DOM element filtering logic so custom elements are recognized even when their constructor name is missing or falsy, and it adds test coverage for both named and anonymous custom elements.

    Features
  • v10.1.0

    4/29/2024

    v10.1.0 adds support for new window events, specifically pagehide and pageshow. The code changes wire these events into the library's event typing and event map so they can be fired/handled consistently.

    Features
  • v10.0.0

    4/8/2024

    Release v10.0.0 documents two main themes: dropping support for Node.js 14.x/16.x and updating aria-query to 5.3.0, with a stated minimum supported Node.js version of 18.0. The provided code diff, however, only shows a CI workflow change related to Codecov integration, not the runtime/library changes described in the release notes.

    Breaking
  • v10.0.0-alpha.3

    4/4/2024

    This release is described as containing two bug fixes, but the provided code diff also includes environment and behavior changes. In particular, the project raises the minimum Node.js version, bumps aria-query, and changes how role-helper selector strings are generated for aria attribute constraints.

    Breaking
  • v9.3.4

    1/8/2024

    v9.3.4 contains a bug fix for dom-testing-library's waitFor behavior around timeouts. The code change ensures that once a waitFor call times out, it no longer continues to invoke the provided callback.