-
Notifications
You must be signed in to change notification settings - Fork 20
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
show file path for obsolete snapshots #19
Conversation
const hasFailures = testResult.failureMessage || hasUncheckedSnapshots; | ||
|
||
if (this.showPaths && hasFailures) { | ||
this.stdio.log('\n' + test.path); |
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.
It should include some text I think, not just the path. log(`Obsolete snapshot at ${test.path}`)
or something?
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.
That text will be logged via helpers.getSnapshotStatus
L60
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.
added result example in the description.
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.
ah, perfect!
@SimenB Would you be able to approve this or it has to be merged by @rickhanlonii ? |
No sorry, I have neither commit nor publish access here |
@rickhanlonii assuming this was closed due to master branch deletion - should change the target branch here |
Hey @ron23, sorry this slipped - can you re-create targeted at the current main branch? |
Hey @rickhanlonii no worries I just created it. Thanks! |
If a test fail due to obsolete snapshot, it's impossible to tell which file has the snapshots.
The filePath flag only address an actual test failure (via asserting
testResult.failureMessage
).This PR adds support to show filePath for obsolete snapshots as well.
This tries to solve the same problem reported here #15 but instead of showing the report, simply show the file path for where the error occurred.
The result