# Feature catalog — testing-library/react-testing-library

> Canonical page: https://codevetter.com/unpack/react-testing-library/feature-catalog

# Feature catalog — testing-library/react-testing-library

Scanned commit 20ce75f2907ca0e5c5a8ae595c0e9a4e368c7800 (2026-08-27). Generated by codevetter codevetter 1.15.0 on 2026-10-02.

Source inspection; upstream code and tests were not executed.

The user-facing surface is an API for test authors. It supports rendering, updating, hydration, hooks, interactions, diagnostics, and test isolation. DOM Testing Library exports broaden that surface without duplicating query implementations here.
- render accepts React UI and returns container, baseElement, bound queries, debug, rerender, unmount, and asFragment. — [src/pure.js#L197-L235](https://github.com/testing-library/react-testing-library/blob/20ce75f2907ca0e5c5a8ae595c0e9a4e368c7800/src/pure.js#L197-L235) [types/index.d.ts#L28-L47](https://github.com/testing-library/react-testing-library/blob/20ce75f2907ca0e5c5a8ae595c0e9a4e368c7800/types/index.d.ts#L28-L47)
- Custom container and baseElement options control mounting and query scope; without either, render creates a div under document.body. — [src/pure.js#L238-L275](https://github.com/testing-library/react-testing-library/blob/20ce75f2907ca0e5c5a8ae595c0e9a4e368c7800/src/pure.js#L238-L275) [src/__tests__/multi-base.js#L18-L38](https://github.com/testing-library/react-testing-library/blob/20ce75f2907ca0e5c5a8ae595c0e9a4e368c7800/src/__tests__/multi-base.js#L18-L38)
- hydrate attaches React to existing markup, while legacyRoot selects older rendering APIs only when ReactDOM.render exists. — [src/pure.js#L114-L129](https://github.com/testing-library/react-testing-library/blob/20ce75f2907ca0e5c5a8ae595c0e9a4e368c7800/src/pure.js#L114-L129) [src/pure.js#L253-L265](https://github.com/testing-library/react-testing-library/blob/20ce75f2907ca0e5c5a8ae595c0e9a4e368c7800/src/pure.js#L253-L265) [src/__tests__/render.js#L179-L201](https://github.com/testing-library/react-testing-library/blob/20ce75f2907ca0e5c5a8ae595c0e9a4e368c7800/src/__tests__/render.js#L179-L201)
- wrapper supplies a surrounding component, and reactStrictMode can be configured globally or overridden per render. — [src/pure.js#L90-L100](https://github.com/testing-library/react-testing-library/blob/20ce75f2907ca0e5c5a8ae595c0e9a4e368c7800/src/pure.js#L90-L100) [types/index.d.ts#L152-L163](https://github.com/testing-library/react-testing-library/blob/20ce75f2907ca0e5c5a8ae595c0e9a4e368c7800/types/index.d.ts#L152-L163)
- renderHook exposes a stable result ref, rerender, and unmount, with initialProps passed to the hook callback. — [src/pure.js#L330-L366](https://github.com/testing-library/react-testing-library/blob/20ce75f2907ca0e5c5a8ae595c0e9a4e368c7800/src/pure.js#L330-L366) [types/index.d.ts#L184-L204](https://github.com/testing-library/react-testing-library/blob/20ce75f2907ca0e5c5a8ae595c0e9a4e368c7800/types/index.d.ts#L184-L204)
- fireEvent forwards DOM event helpers and adds React-specific enter/leave, selection, and focus/blur event sequences; act is also publicly exported. — [src/fire-event.js#L7-L67](https://github.com/testing-library/react-testing-library/blob/20ce75f2907ca0e5c5a8ae595c0e9a4e368c7800/src/fire-event.js#L7-L67) [src/pure.js#L369-L371](https://github.com/testing-library/react-testing-library/blob/20ce75f2907ca0e5c5a8ae595c0e9a4e368c7800/src/pure.js#L369-L371)
- Consumers receive DOM Testing Library exports, including screen and asynchronous query utilities used in the integration tests. — [src/pure.js#L369-L371](https://github.com/testing-library/react-testing-library/blob/20ce75f2907ca0e5c5a8ae595c0e9a4e368c7800/src/pure.js#L369-L371) [src/__tests__/end-to-end.js#L1-L7](https://github.com/testing-library/react-testing-library/blob/20ce75f2907ca0e5c5a8ae595c0e9a4e368c7800/src/__tests__/end-to-end.js#L1-L7) [src/__tests__/end-to-end.js#L55-L74](https://github.com/testing-library/react-testing-library/blob/20ce75f2907ca0e5c5a8ae595c0e9a4e368c7800/src/__tests__/end-to-end.js#L55-L74)
- cleanup is public and normally registered automatically; consumers can choose the pure entrypoint or load dont-cleanup-after-each.js to control teardown themselves. — [src/index.js#L4-L23](https://github.com/testing-library/react-testing-library/blob/20ce75f2907ca0e5c5a8ae595c0e9a4e368c7800/src/index.js#L4-L23) [dont-cleanup-after-each.js#L1-L1](https://github.com/testing-library/react-testing-library/blob/20ce75f2907ca0e5c5a8ae595c0e9a4e368c7800/dont-cleanup-after-each.js#L1-L1) [pure.js#L1-L2](https://github.com/testing-library/react-testing-library/blob/20ce75f2907ca0e5c5a8ae595c0e9a4e368c7800/pure.js#L1-L2) [src/pure.js#L371-L371](https://github.com/testing-library/react-testing-library/blob/20ce75f2907ca0e5c5a8ae595c0e9a4e368c7800/src/pure.js#L371-L371)

Every claim links to its cited files at the pinned commit. Citations identify source evidence; they do not establish runtime correctness. Independent CodeVetter scan — not reviewed by upstream maintainers.

## Public product links

- [CodeVetter](https://codevetter.com/)
- [Download](https://codevetter.com/download)
- [Documentation](https://codevetter.com/docs/)
- [Source](https://github.com/Codevetter/codevetter)
