-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
fix(snapshot)!: fail test with obsolete snapshot on CI #7963
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(snapshot)!: fail test with obsolete snapshot on CI #7963
Conversation
✅ Deploy Preview for vitest-dev ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
this.workerState.config.snapshotOptions.updateSnapshot === 'none' | ||
&& result.unchecked | ||
) { | ||
const error = new Error(`Obsolete snapshots found: ${result.uncheckedKeys.join(', ')}`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we can print it in a better way (should we? obsolete snapshots are already printed one line at a time, but without the separation by test file)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tweaked the error message. Please check the example in the PR description. It's mostly a copy of the base reporter.
We also need to add this to migration guide |
Description
example
Please don't delete this checklist! Before submitting the PR, please make sure you do the following:
pnpm-lock.yaml
unless you introduce a new test example.Tests
pnpm test:ci
.Documentation
pnpm run docs
command.Changesets
feat:
,fix:
,perf:
,docs:
, orchore:
.