# Contributor handoff — testing-library/dom-testing-library

> Canonical page: https://codevetter.com/unpack/dom-testing-library/agent-handoff

# Contributor handoff — testing-library/dom-testing-library

Scanned commit 6049cc0bc7cf2201625c476c95fa6299d0e2fa8b (2026-09-13). Generated by codevetter codevetter 1.15.0 on 2026-10-02.

Source inspection; upstream code and tests were not executed.

Start with the public export surface, shared query factories, and the smallest family-specific implementation involved in the task. Preserve runtime and declaration parity, query cardinality, node ownership, and timer cleanup when making changes. Tests and CI were inspected, not executed, and this brief is bounded rather than an exhaustive coverage or security assessment. The commands below identify existing validation entrypoints for a separately authorized implementation task; the present investigation remained read-only.
- Read README's DOM-node/user-behavior principles, package.json entrypoints/scripts, src/index.js, and types/index.d.ts first to establish product intent and the shipped runtime/type contracts. — [README.md#L64-L84](https://github.com/testing-library/dom-testing-library/blob/6049cc0bc7cf2201625c476c95fa6299d0e2fa8b/README.md#L64-L84) [README.md#L107-L124](https://github.com/testing-library/dom-testing-library/blob/6049cc0bc7cf2201625c476c95fa6299d0e2fa8b/README.md#L107-L124) [package.json#L5-L9](https://github.com/testing-library/dom-testing-library/blob/6049cc0bc7cf2201625c476c95fa6299d0e2fa8b/package.json#L5-L9) [package.json#L45-L60](https://github.com/testing-library/dom-testing-library/blob/6049cc0bc7cf2201625c476c95fa6299d0e2fa8b/package.json#L45-L60) [src/index.js#L5-L27](https://github.com/testing-library/dom-testing-library/blob/6049cc0bc7cf2201625c476c95fa6299d0e2fa8b/src/index.js#L5-L27) [types/index.d.ts#L7-L22](https://github.com/testing-library/dom-testing-library/blob/6049cc0bc7cf2201625c476c95fa6299d0e2fa8b/types/index.d.ts#L7-L22)
- For query edits, inspect the family module alongside query-helpers and matches; preserve missing/multiple behavior and remember that LabelText bypasses buildQueries to distinguish broken label associations. — [src/query-helpers.ts#L63-L84](https://github.com/testing-library/dom-testing-library/blob/6049cc0bc7cf2201625c476c95fa6299d0e2fa8b/src/query-helpers.ts#L63-L84) [src/query-helpers.ts#L101-L139](https://github.com/testing-library/dom-testing-library/blob/6049cc0bc7cf2201625c476c95fa6299d0e2fa8b/src/query-helpers.ts#L101-L139) [src/matches.ts#L89-L111](https://github.com/testing-library/dom-testing-library/blob/6049cc0bc7cf2201625c476c95fa6299d0e2fa8b/src/matches.ts#L89-L111) [src/queries/label-text.ts#L124-L164](https://github.com/testing-library/dom-testing-library/blob/6049cc0bc7cf2201625c476c95fa6299d0e2fa8b/src/queries/label-text.ts#L124-L164) [src/queries/label-text.ts#L180-L204](https://github.com/testing-library/dom-testing-library/blob/6049cc0bc7cf2201625c476c95fa6299d0e2fa8b/src/queries/label-text.ts#L180-L204)
- For async edits, follow makeFindQuery through waitForWrapper and waitFor; inspect pending-promise, timer-switch, fake-clock, and removal tests before changing scheduling or completion. — [src/query-helpers.ts#L120-L139](https://github.com/testing-library/dom-testing-library/blob/6049cc0bc7cf2201625c476c95fa6299d0e2fa8b/src/query-helpers.ts#L120-L139) [src/wait-for.js#L183-L192](https://github.com/testing-library/dom-testing-library/blob/6049cc0bc7cf2201625c476c95fa6299d0e2fa8b/src/wait-for.js#L183-L192) [src/__tests__/wait-for.js#L196-L267](https://github.com/testing-library/dom-testing-library/blob/6049cc0bc7cf2201625c476c95fa6299d0e2fa8b/src/__tests__/wait-for.js#L196-L267) [src/__tests__/fake-timers.js#L18-L108](https://github.com/testing-library/dom-testing-library/blob/6049cc0bc7cf2201625c476c95fa6299d0e2fa8b/src/__tests__/fake-timers.js#L18-L108) [src/__tests__/wait-for-element-to-be-removed.js#L120-L151](https://github.com/testing-library/dom-testing-library/blob/6049cc0bc7cf2201625c476c95fa6299d0e2fa8b/src/__tests__/wait-for-element-to-be-removed.js#L120-L151)
- API changes need review of separate declarations and BoundFunctions; build disables generated TypeScript definitions, and the existing npm run typecheck script builds the types project containing public API fixtures. — [package.json#L46-L55](https://github.com/testing-library/dom-testing-library/blob/6049cc0bc7cf2201625c476c95fa6299d0e2fa8b/package.json#L46-L55) [types/queries.d.ts#L140-L170](https://github.com/testing-library/dom-testing-library/blob/6049cc0bc7cf2201625c476c95fa6299d0e2fa8b/types/queries.d.ts#L140-L170) [types/get-queries-for-element.d.ts#L120-L160](https://github.com/testing-library/dom-testing-library/blob/6049cc0bc7cf2201625c476c95fa6299d0e2fa8b/types/get-queries-for-element.d.ts#L120-L160) [types/tsconfig.json#L1-L7](https://github.com/testing-library/dom-testing-library/blob/6049cc0bc7cf2201625c476c95fa6299d0e2fa8b/types/tsconfig.json#L1-L7) [types/__tests__/type-tests.ts#L28-L51](https://github.com/testing-library/dom-testing-library/blob/6049cc0bc7cf2201625c476c95fa6299d0e2fa8b/types/__tests__/type-tests.ts#L28-L51)
- Use existing npm test for relevant Jest checks and npm run typecheck for declaration changes in an authorized execution context; CI's broader entrypoints are npm run format -- --check --no-write and npm run validate. None were executed here. — [package.json#L45-L55](https://github.com/testing-library/dom-testing-library/blob/6049cc0bc7cf2201625c476c95fa6299d0e2fa8b/package.json#L45-L55) [.github/workflows/validate.yml#L49-L54](https://github.com/testing-library/dom-testing-library/blob/6049cc0bc7cf2201625c476c95fa6299d0e2fa8b/.github/workflows/validate.yml#L49-L54) [jest.config.js#L20-L23](https://github.com/testing-library/dom-testing-library/blob/6049cc0bc7cf2201625c476c95fa6299d0e2fa8b/jest.config.js#L20-L23)
- Restore global configuration and timer modes in tests; existing suites snapshot getConfig/configure restoration and jest.useRealTimers, while the render helper clears document.body after each test. — [src/__tests__/config.js#L4-L20](https://github.com/testing-library/dom-testing-library/blob/6049cc0bc7cf2201625c476c95fa6299d0e2fa8b/src/__tests__/config.js#L4-L20) [src/__tests__/wait-for.js#L17-L25](https://github.com/testing-library/dom-testing-library/blob/6049cc0bc7cf2201625c476c95fa6299d0e2fa8b/src/__tests__/wait-for.js#L17-L25) [tests/setup-env.js#L37-L44](https://github.com/testing-library/dom-testing-library/blob/6049cc0bc7cf2201625c476c95fa6299d0e2fa8b/tests/setup-env.js#L37-L44) [src/__tests__/helpers/test-utils.js#L16-L20](https://github.com/testing-library/dom-testing-library/blob/6049cc0bc7cf2201625c476c95fa6299d0e2fa8b/src/__tests__/helpers/test-utils.js#L16-L20)
- Watch environment-specific traps: screen captures body availability at import time, getWindowFromNode rejects unusable owner windows and mistakenly supplied promises, and event values may require the prototype setter rather than ordinary assignment. — [src/screen.ts#L49-L64](https://github.com/testing-library/dom-testing-library/blob/6049cc0bc7cf2201625c476c95fa6299d0e2fa8b/src/screen.ts#L49-L64) [src/helpers.ts#L28-L45](https://github.com/testing-library/dom-testing-library/blob/6049cc0bc7cf2201625c476c95fa6299d0e2fa8b/src/helpers.ts#L28-L45) [src/events.js#L106-L122](https://github.com/testing-library/dom-testing-library/blob/6049cc0bc7cf2201625c476c95fa6299d0e2fa8b/src/events.js#L106-L122) [src/__node_tests__/screen.js#L1-L9](https://github.com/testing-library/dom-testing-library/blob/6049cc0bc7cf2201625c476c95fa6299d0e2fa8b/src/__node_tests__/screen.js#L1-L9)
- Review snapshot changes semantically: an existing Text test intentionally records undesired ignore behavior. Keep release changes separately authorized because the upstream workflow builds/releases after validation and maintainers document commit-message-driven versioning. — [src/__tests__/element-queries.js#L1291-L1319](https://github.com/testing-library/dom-testing-library/blob/6049cc0bc7cf2201625c476c95fa6299d0e2fa8b/src/__tests__/element-queries.js#L1291-L1319) [CONTRIBUTING.md#L29-L33](https://github.com/testing-library/dom-testing-library/blob/6049cc0bc7cf2201625c476c95fa6299d0e2fa8b/CONTRIBUTING.md#L29-L33) [.github/workflows/validate.yml#L70-L95](https://github.com/testing-library/dom-testing-library/blob/6049cc0bc7cf2201625c476c95fa6299d0e2fa8b/.github/workflows/validate.yml#L70-L95) [other/MAINTAINING.md#L64-L76](https://github.com/testing-library/dom-testing-library/blob/6049cc0bc7cf2201625c476c95fa6299d0e2fa8b/other/MAINTAINING.md#L64-L76)

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)
