CodeVetter · Repo Unpack · Testing signals
testing-library/react-testing-library
Tests and CI were inspected, not executed; no passing result or measured coverage is asserted. Jest suites in src/__tests__ exercise DOM behavior, scheduling, cleanup, hooks, and React-version branches, while types/test.tsx supplies declaration checks. The inspected inventory is bounded, and several tests or configuration branches explicitly limit what can be concluded.
- Jest configuration extends kcd-scripts/config, and tests/setup-env.js installs jest-dom assertions, console-call enforcement, TextEncoder, and a worker_threads MessageChannel.
- Rendering tests assert portals, fragment snapshots, wrapper composition, StrictMode effects, repeated-container rendering, hydration interactivity, and version-gated legacy behavior.
- Cleanup suites test automatic cleanup and its skip switch, effect teardown, detached containers, non-flushing of microtasks, and preservation of missing-act warnings.
- Event tests generate React-handler and native-listener cases from an event table; a separate regression asserts nested eventWrapper behavior and absence of act warnings.
- Async integration tests exercise waitForElementToBeRemoved, waitFor, and findBy across real, legacy fake, and modern fake timers, including long promise chains; their loaders simulate data rather than contacting a server.
- Hook tests assert committed output, rerender props, providers, and version-gated legacy roots; renderHook's recoverable-error test accepts the option but contains a TODO instead of triggering recovery.
- types/test.tsx checks render/query/config/hook usage and container inference; root typecheck includes types with strict and exactOptionalPropertyTypes enabled, but onCaughtError's cross-version fixture uses @ts-ignore.
- PR CI spans Node 18/24 and React 18.x/latest/canary/experimental, permits non-latest failures, and uploads coverage. Jest relaxes per-job core thresholds while Codecov specifies a 100% project target for selected flags.