Skip to content
Discussion options

You must be logged in to vote

EDIT: created #9694

It looks like we are missing docs. We detect process.env.CI variable and such, then automatically flip this --update flag to be false https://vitest.dev/config/update.html This should be documented in https://vitest.dev/guide/snapshot.html#updating-snapshots

const UPDATE_SNAPSHOT = resolved.update || process.env.UPDATE_SNAPSHOT
resolved.snapshotOptions = {
expand: resolved.expandSnapshotDiff ?? false,
snapshotFormat: resolved.snapshotFormat || {},
updateSnapshot:
UPDATE_SNAPSHOT === 'all' || UPDATE_SNAPSHOT === 'new'
? UPDATE_SNAPSHOT
: isCI

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@snebjorn
Comment options

Answer selected by snebjorn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants