# Extension points — testing-library/react-testing-library

> Canonical page: https://codevetter.com/unpack/react-testing-library/extension-points

# Extension points — 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.

Consumer extension primarily happens through render options and configuration rather than a plugin registry. The root adapters and event forwarding also provide internal seams for compatibility work. Public additions need coordinated runtime exports, declarations, and behavioral tests.
- RenderOptions.queries accepts a custom query set, and renderRoot binds it through getQueriesForElement; custom sets replace defaults unless the caller merges them. — [types/index.d.ts#L147-L151](https://github.com/testing-library/react-testing-library/blob/20ce75f2907ca0e5c5a8ae595c0e9a4e368c7800/types/index.d.ts#L147-L151) [src/pure.js#L234-L235](https://github.com/testing-library/react-testing-library/blob/20ce75f2907ca0e5c5a8ae595c0e9a4e368c7800/src/pure.js#L234-L235)
- RenderResult maps each supplied query key to BoundFunction, preserving custom-query typing through the generic render overload. — [types/index.d.ts#L28-L47](https://github.com/testing-library/react-testing-library/blob/20ce75f2907ca0e5c5a8ae595c0e9a4e368c7800/types/index.d.ts#L28-L47) [types/index.d.ts#L171-L182](https://github.com/testing-library/react-testing-library/blob/20ce75f2907ca0e5c5a8ae595c0e9a4e368c7800/types/index.d.ts#L171-L182)
- wrapper is the documented seam for reusable render helpers that install providers; renderHook passes it through the same render pipeline. — [types/index.d.ts#L152-L158](https://github.com/testing-library/react-testing-library/blob/20ce75f2907ca0e5c5a8ae595c0e9a4e368c7800/types/index.d.ts#L152-L158) [src/pure.js#L355-L358](https://github.com/testing-library/react-testing-library/blob/20ce75f2907ca0e5c5a8ae595c0e9a4e368c7800/src/pure.js#L355-L358) [src/__tests__/renderHook.js#L53-L68](https://github.com/testing-library/react-testing-library/blob/20ce75f2907ca0e5c5a8ae595c0e9a4e368c7800/src/__tests__/renderHook.js#L53-L68)
- configure accepts object or functional deltas and forwards DOM options, supporting changes such as testIdAttribute alongside RTL strict mode. — [src/config.js#L17-L31](https://github.com/testing-library/react-testing-library/blob/20ce75f2907ca0e5c5a8ae595c0e9a4e368c7800/src/config.js#L17-L31) [src/__tests__/config.js#L19-L64](https://github.com/testing-library/react-testing-library/blob/20ce75f2907ca0e5c5a8ae595c0e9a4e368c7800/src/__tests__/config.js#L19-L64)
- createConcurrentRoot and createLegacyRoot are internal factories with the same lifecycle methods; render chooses between them via legacyRoot. — [src/pure.js#L132-L163](https://github.com/testing-library/react-testing-library/blob/20ce75f2907ca0e5c5a8ae595c0e9a4e368c7800/src/pure.js#L132-L163) [src/pure.js#L279-L288](https://github.com/testing-library/react-testing-library/blob/20ce75f2907ca0e5c5a8ae595c0e9a4e368c7800/src/pure.js#L279-L288)
- fireEvent copies every enumerable DOM helper at module load, then overrides selected helpers; new React event adaptations belong beside those explicit sequences. — [src/fire-event.js#L7-L35](https://github.com/testing-library/react-testing-library/blob/20ce75f2907ca0e5c5a8ae595c0e9a4e368c7800/src/fire-event.js#L7-L35) [src/fire-event.js#L38-L67](https://github.com/testing-library/react-testing-library/blob/20ce75f2907ca0e5c5a8ae595c0e9a4e368c7800/src/fire-event.js#L38-L67)
- onCaughtError and onRecoverableError are root-creation callback seams, with onCaughtError typed conditionally against installed ReactDOM RootOptions; onUncaughtError is deliberately excluded. — [types/index.d.ts#L122-L145](https://github.com/testing-library/react-testing-library/blob/20ce75f2907ca0e5c5a8ae595c0e9a4e368c7800/types/index.d.ts#L122-L145) [src/pure.js#L114-L129](https://github.com/testing-library/react-testing-library/blob/20ce75f2907ca0e5c5a8ae595c0e9a4e368c7800/src/pure.js#L114-L129) [src/pure.js#L253-L257](https://github.com/testing-library/react-testing-library/blob/20ce75f2907ca0e5c5a8ae595c0e9a4e368c7800/src/pure.js#L253-L257)
- The pure import lets alternative runners own cleanup scheduling while retaining the public API; its declaration forwarding chain ends at the same types/index.d.ts surface. — [src/index.js#L4-L8](https://github.com/testing-library/react-testing-library/blob/20ce75f2907ca0e5c5a8ae595c0e9a4e368c7800/src/index.js#L4-L8) [pure.js#L1-L2](https://github.com/testing-library/react-testing-library/blob/20ce75f2907ca0e5c5a8ae595c0e9a4e368c7800/pure.js#L1-L2) [pure.d.ts#L1-L1](https://github.com/testing-library/react-testing-library/blob/20ce75f2907ca0e5c5a8ae595c0e9a4e368c7800/pure.d.ts#L1-L1) [types/pure.d.ts#L1-L1](https://github.com/testing-library/react-testing-library/blob/20ce75f2907ca0e5c5a8ae595c0e9a4e368c7800/types/pure.d.ts#L1-L1)

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)
