fix(testing/unstable): report descriptive error when inline snapshot update fails#7191
Open
minato32 wants to merge 1 commit into
Open
fix(testing/unstable): report descriptive error when inline snapshot update fails#7191minato32 wants to merge 1 commit into
minato32 wants to merge 1 commit into
Conversation
…update fails Closes denoland#6746
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #7191 +/- ##
==========================================
- Coverage 94.57% 94.55% -0.02%
==========================================
Files 636 637 +1
Lines 52142 52157 +15
Branches 9401 9402 +1
==========================================
+ Hits 49315 49319 +4
- Misses 2249 2259 +10
- Partials 578 579 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Closes #6746.
When
assertInlineSnapshot()is run with--updateand the post-updatedeno fmtsubprocess fails (e.g. the test was run without--allow-run), the original error was thrown from inside theunloadhandler and surfaced through the test runner aserror: null, giving the caller no clue what went wrong.The unload handler now catches errors from
updateSnapshots()and re-throws them wrapped in anErrorwhose message is prefixed withassertInlineSnapshot: failed to update snapshots:and whosecauseis the original error, so both the runner output and any tooling readingcauseget the real reason.