feat(cli): accept -u as the short form of --snapshot-update - #1294
Merged
Conversation
jest spells it -u, --updateSnapshot and vitest -u, --update, so -u is what anyone arriving from either types first -- and it was an unknown option, so the run failed instead of re-recording. The long form is unchanged. Closes #1293
…date-short-flag # Conflicts: # CHANGELOG.md
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.
🤔 Background
Related #1293
--snapshot-updategets retyped more than most flags — it is what you reach for the moment a deliberate output change turns a snapshot red — and it had no short form. jest (-u, --updateSnapshot) and vitest (-u, --update) agree on-u, so that is what anyone arriving from either types first; today it is an unknown option and the run fails.💡 Changes
-uaccepted as an alias; the long form is unchanged.-uwas unclaimed among the short options in useSame reasoning as
--pass-with-no-tests: adopt the ecosystem's spelling rather than invent a third one.