CodeVetter · Repo Unpack · Contributor handoff
jestjs/jest
Tests and CI were inspected, not executed, and this brief does not certify a passing checkout. Start from the relevant package source and preserve contracts at configuration, Runtime, runner, and persistence boundaries. Small focused changes must account for cross-package imports loading built artifacts and for separately checked declarations. Future execution requires authorization appropriate to that task; this investigation performed only source reads and searches.
- Read root/package manifests, jest.config.mjs, and the implementing package first; build exports point to build artifacts, while root scripts distinguish JavaScript bundling, declaration build, and declaration bundling.
- For an authorized change, use the existing yarn jest <path> workflow first; rebuild JavaScript when e2e or other workspaces consume the edit, and use the full build when declarations or cross-package type checks change.
- Runtime edits must retain public dispatch seams and capability conditions; nodeCapabilities detects SyntheticModule and SourceTextModule.prototype.hasAsyncGraph, while ESM loading also checks resolver capabilities.
- Preserve runTestInternal as a separate closure for leak detection and keep runtime teardown before environment teardown; its setupFiles execution occurs before the later guarded framework-execution block.
- Snapshot edits should read State, matcher dispatch, adapter persistence, and snapshot utilities together; preserve identity-based retry rollback and the CI normalization that selects none unless updateSnapshot is explicitly requested.
- Add e2e behavior through fixture files rather than jest.fn/mock/spyOn in driver tests; the subprocess helper strips agent-detection variables and disables colors, so output assertions depend on that controlled environment.
- Follow strict TypeScript and repository formatting constraints, use graceful-fs/globalThis in the governed source, and preserve bare built-in imports in browser-compatible packages where node: imports are explicitly prohibited.
- Tests and CI were inspected, not executed: future validation should select the relevant existing package/e2e/type scripts and report actual results. Keep release/deployment separate because pkg-pr-new publishes packages and website production preparation performs supporter fetches and Crowdin upload/download.