CodeVetter · Repo Unpack · Contributor handoff
testing-library/dom-testing-library
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.
- 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.
- For async edits, follow makeFindQuery through waitForWrapper and waitFor; inspect pending-promise, timer-switch, fake-clock, and removal tests before changing scheduling or completion.
- 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.
- 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.
- 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.
- 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.
- 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.