Back to Explore

testing-library/react-testing-library

GitHub
1 watchersOpen source

Last release:

React Testing Library provides lightweight React DOM testing utilities built on top of react-dom and react-dom/test-utils, with guidance to write maintainable tests that focus on how components are used rather than implementation details. It includes helpers for rendering components and querying the DOM, suitable for testing React UI behavior.

Project status

  • Actively maintained, last upstream push was 2026-04-02 (and the most recent tagged update shown is v16.3.2 on 2026-01-19), suggesting ongoing work through at least the first half of 2026.
  • Update cadence is somewhat irregular but fairly recent, with v16.3.2 in Jan 2026 and v16.3.1 in Dec 2025 (about a month apart), while earlier jumps were larger (for example, v16.2.0 in Jan 2025 to v16.3.0 in Apr 2025).

AI summary generated

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

Recent updates

  • v16.3.2

    v16.3.2 ships a TypeScript type-only fix for React 19 compatibility around the RenderOptions.onCaughtError typing. The only functional change in the diff is in the generated type definitions, plus an accompanying adjustment to a TypeScript test.

  • v16.3.1

    Release v16.3.1 is documented as a single bug fix related to switching release publishing to trusted publishing. The code diff confirms workflow changes for publishing, but it also includes several build and toolchain changes that are not mentioned in the release notes.

  • v16.3.0

    The v16.3.0 release notes only mention adding a new contributor, with no product changes described. However, the code diff shows new API surface and behavior around StrictMode handling during `render` and `renderHook`, plus React version bumps used by the project’s own dev/test tooling.

    Features
  • v16.2.0

    Release v16.2.0 adds support for React error handler callbacks via the `render` API, including forwarding `onCaughtError` and `onRecoverableError` to React 19 root options. The code diff also introduces an explicit runtime rejection for `onUncaughtError` and updates TypeScript types to reflect supported versus unsupported callbacks.

    BreakingFeatures
  • v16.1.0

    v16.1.0 adds support for React 19. The code changes primarily update the library’s TypeScript React type compatibility and adjust peer dependency ranges to allow React 19 in addition to React 18.

    Features
  • v16.0.1

    v16.0.1 primarily updates the TypeScript type definitions to better support the compiler option exactOptionalPropertyTypes. The code changes focus on making optional properties and function parameters explicitly compatible with exact optional semantics.

  • v16.0.0

    RTL v16.0.0 updates installation guidance and dependency metadata so that @testing-library/dom and @types/react-dom are treated as peers rather than bundled dependencies. This aims to reduce version conflicts (especially with @testing-library/user-event) by letting the consuming project control the versions.

    Breaking
  • v15.0.7

    v15.0.7 is a small TypeScript-focused bug fix that improves typing for the `act` export. It adjusts the conditional type used for `act` based on whether `React.act` is declared, aiming to prevent `act` from being inferred as `any`.

  • v15.0.6

    v15.0.6 primarily updates the exported React testing `act` to use the newer implementation when available. The release notes only mention this as a bug fix, but the code changes also adjust TypeScript typings and dependency metadata.

  • v15.0.5

    v15.0.5 is presented as a bug fix that relaxes how the `container` option is typed/handled when `hydrate` is used. The diff also shows additional, undocumented changes around TypeScript type definitions and React dependency versions used in the project.