-
-
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: Improve report when matcher fails, part 10 #7960
Conversation
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.
Already conceptionally approved this in our discussion, found nothing too complain about in this implementation either :) great work!
Codecov Report
@@ Coverage Diff @@
## master #7960 +/- ##
=========================================
Coverage ? 64.93%
=========================================
Files ? 255
Lines ? 10021
Branches ? 1365
=========================================
Hits ? 6507
Misses ? 3200
Partials ? 314
Continue to review full report at Codecov.
|
Could we pad the quote character so it plays nice with emojis? Totally unrelated to the fix, of course |
I think doing this is (in general, perhaps not in some controlled environments) a dangerous path to go because it can wreck alignment in the monospace grid. Terminal emulators for good reasons render overlapping characters instead of doing padding magic. |
Yeah, good thinking. The picture was humorous result from serious attempt at realistic failure because of incorrect expected length related to Unicode. |
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
For
.toHaveLength
matcher:ensureExpectedIsNonNegativeInteger
function withoptions
argumentExpected length:
labelnot
expected value (am happy if y’all can suggest as an alternative a concise explicit way to communicate that is reason why test fails)For more information, see discussion with @jeysal in #7795
Test plan
.not
.rejects
and.resolves
See also pictures in following comment