# System map — testing-library/react-testing-library

> Canonical page: https://codevetter.com/unpack/react-testing-library/system-map

# System map — 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 runtime is a library loaded into a consumer's test process and DOM environment. React owns rendering, DOM Testing Library owns query machinery, and this repository supplies lifecycle and scheduling adapters. Distribution and release are described by package scripts and GitHub workflows.
- The package advertises dist/index.js as main, an ESM bundle as module, types/index.d.ts as declarations, and Node >=18. — [package.json#L2-L10](https://github.com/testing-library/react-testing-library/blob/20ce75f2907ca0e5c5a8ae595c0e9a4e368c7800/package.json#L2-L10)
- src/index.js adds runner lifecycle hooks and then re-exports src/pure.js; the published pure.js shim instead requires dist/pure. — [src/index.js#L9-L41](https://github.com/testing-library/react-testing-library/blob/20ce75f2907ca0e5c5a8ae595c0e9a4e368c7800/src/index.js#L9-L41) [pure.js#L1-L2](https://github.com/testing-library/react-testing-library/blob/20ce75f2907ca0e5c5a8ae595c0e9a4e368c7800/pure.js#L1-L2)
- src/pure.js is the orchestration module: it imports React, both ReactDOM APIs, DOM query utilities, act compatibility, event adaptation, and configuration. — [src/pure.js#L1-L14](https://github.com/testing-library/react-testing-library/blob/20ce75f2907ca0e5c5a8ae595c0e9a4e368c7800/src/pure.js#L1-L14) [src/pure.js#L369-L371](https://github.com/testing-library/react-testing-library/blob/20ce75f2907ca0e5c5a8ae595c0e9a4e368c7800/src/pure.js#L369-L371)
- Root adapters provide a common hydrate/render/unmount interface over ReactDOMClient and legacy ReactDOM methods. — [src/pure.js#L102-L163](https://github.com/testing-library/react-testing-library/blob/20ce75f2907ca0e5c5a8ae595c0e9a4e368c7800/src/pure.js#L102-L163)
- Lifecycle storage consists of module-local mountedContainers and mountedRootEntries; cleanup clears both after unmounting. — [src/pure.js#L79-L88](https://github.com/testing-library/react-testing-library/blob/20ce75f2907ca0e5c5a8ae595c0e9a4e368c7800/src/pure.js#L79-L88) [src/pure.js#L317-L328](https://github.com/testing-library/react-testing-library/blob/20ce75f2907ca0e5c5a8ae595c0e9a4e368c7800/src/pure.js#L317-L328)
- React and ReactDOM 18 or 19 and DOM Testing Library 10 are peer integrations; @babel/runtime is the declared production dependency. — [package.json#L47-L49](https://github.com/testing-library/react-testing-library/blob/20ce75f2907ca0e5c5a8ae595c0e9a4e368c7800/package.json#L47-L49) [package.json#L65-L79](https://github.com/testing-library/react-testing-library/blob/20ce75f2907ca0e5c5a8ae595c0e9a4e368c7800/package.json#L65-L79)
- Build runs three parallel kcd-scripts targets; test, lint, validate, and typecheck are package scripts, with typecheck invoking tsc against the root config. — [package.json#L11-L24](https://github.com/testing-library/react-testing-library/blob/20ce75f2907ca0e5c5a8ae595c0e9a4e368c7800/package.json#L11-L24) [tsconfig.json#L33-L44](https://github.com/testing-library/react-testing-library/blob/20ce75f2907ca0e5c5a8ae595c0e9a4e368c7800/tsconfig.json#L33-L44)
- Release builds npm artifacts after validation and invokes semantic-release 25 only for pushes in the upstream repository; the package includes dist, shims, and declaration files. — [package.json#L26-L32](https://github.com/testing-library/react-testing-library/blob/20ce75f2907ca0e5c5a8ae595c0e9a4e368c7800/package.json#L26-L32) [.github/workflows/release.yml#L81-L115](https://github.com/testing-library/react-testing-library/blob/20ce75f2907ca0e5c5a8ae595c0e9a4e368c7800/.github/workflows/release.yml#L81-L115)

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)
