fix(e2e): keep timing_env testEnvironment through yarn prepare - #24328
Merged
PhilWindle merged 1 commit intoJun 26, 2026
Merged
Conversation
PR #24281 set end-to-end's jest testEnvironment to ./shared/timing_env.mjs directly in package.json, but testEnvironment is an inherited field: the package.json generator shallow-merges the jest block with the parent winning, and package.common.json sets testEnvironment to ../../foundation/src/jest/env.mjs. So 'yarn prepare' reverts the override and prepare:check fails (the inconsistency slipped onto the base because GitHub squash-merge does not run the local pre-commit hook). Move the override into end-to-end/package.local.json, which the generator applies last, so the timing test environment survives prepare and the check stays consistent.
alexghr
approved these changes
Jun 26, 2026
PhilWindle
enabled auto-merge (squash)
June 26, 2026 12:34
Collaborator
Flakey Tests🤖 says: This CI run detected 1 tests that failed, but were tolerated due to a .test_patterns.yml entry. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
PR #24281 added
end-to-end/src/shared/timing_env.mjsand set the jesttestEnvironmentto./shared/timing_env.mjsdirectly inend-to-end/package.json. ButtestEnvironmentis an inherited field: the package.json generator (scripts/update_package_jsons.mjs) shallow-merges each package'sjestblock with the parent winning, andpackage.common.jsonsetstestEnvironmentto../../foundation/src/jest/env.mjs.As a result,
yarn preparereverts the override back to the foundation env, andyarn prepare:check(run by the pre-commit hook) fails. The inconsistency reachedmerge-train/spartan-v5because GitHub squash-merge doesn't run the local pre-commit hook, so anyone merging this base and committing locally now hits the failure.Fix
Move the
testEnvironmentoverride intoend-to-end/package.local.json, which the generator applies last, so the timing test environment survivesprepareand the generatedend-to-end/package.jsonstays consistent with the inherits sources.Verified:
node scripts/update_package_jsons.mjs --checkpasses with this change and leavesend-to-end/package.jsonpointing at./shared/timing_env.mjs.