-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
expect, jest-matcher-utils: Display change counts in annotation lines #9035
expect, jest-matcher-utils: Display change counts in annotation lines #9035
Conversation
Analysis of the preceding example might decide whether it is progress or regress to change from
|
Codecov Report
@@ Coverage Diff @@
## master #9035 +/- ##
=======================================
Coverage 64.05% 64.05%
=======================================
Files 277 277
Lines 11676 11676
Branches 2863 2863
=======================================
Hits 7479 7479
Misses 3572 3572
Partials 625 625
Continue to review full report at Codecov.
|
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Summary
In the
printDiffOrStringify
function, addincludeChangeCounts
option to calls:diffStringsUnified
diffDefault
For consistency with #8982 to interpret differences when other assertions fail
Residue
Did not add
includeChangeCounts
option:diff
named export fromjest-matcher-utils
but caller can add itI noticed something brittle about a few snapshots of matcher errors which contain diffs: when I tested with
--expand
option to see all of the lines in the snapshot to count changes, it affected the matcher, which is not correct.Test plan
Updated 76 snapshots
The differences between empty and non-empty map or object are example where change counts would be even clearer in a data-driven-diff
e2e
failures
expect
extend
expect
matchers
expect
toThrowMatchers
jest-matcher-utils
index
jest-matcher-utils
printDiffOrStringify
See also pictures in following comment: baseline is at left and improved is at right