Repository navigation
Conversation
`set-version-test` registered its `node:fs` mock in `beforeAll` and its `shared/consts` mock after requiring `set-version`, so the mocks only applied because inline requires deferred loading `set-version`'s dependencies until first use. Without that, `setVersion` writes to the real repo, nothing is snapshotted, and Jest reports 38 obsolete snapshots, which fails `--ci`. Both mocks are now registered before `set-version` is required. Changelog: [Internal]
This branch has not been deployed
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.
Summary:
Missed from #59307:
set-version-testregisters itsnode:fsandshared/constsmocks after loadingset-version, so they only applied because inline requires deferred loading its dependencies. This registers both mocks beforeset-versionis required.Prerequisite for #59303, without which
setVersionwrites to the real repo, its 38 snapshots go obsolete, andtest_jsfails under--ci.Changelog:
[INTERNAL] [CHANGED] - Mock fs and repo paths before loading set-version in its test
Test Plan:
set-version-testpasses with all 38 snapshots checked, on main and with #59303 on top, and leaves the checkout untouched.