-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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
assert: fix the string length check for printing the simple diff #55474
assert: fix the string length check for printing the simple diff #55474
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #55474 +/- ##
==========================================
- Coverage 88.42% 88.42% -0.01%
==========================================
Files 653 653
Lines 187498 187422 -76
Branches 36100 36072 -28
==========================================
- Hits 165791 165721 -70
+ Misses 14957 14950 -7
- Partials 6750 6751 +1
|
Hi! Please mark the PRas draft if it's not ready to be reviewed, thank way, it'll be easier for reviewers to peruse the issue tracker |
02d82f2
to
228cc94
Compare
Yes, yesterday when I pushed I was running aroung in between flights, it was hard for me to handle github on the phone :) You can remove the wip label now! |
Hey @puskin94, I think we should also add some tests related to the difference in behavior between "colored" and "non-colored" diff. |
@pmarchini that MR has been merged but didn't improve the colored output in assertion related checks |
Hey @puskin94, could you please create a draft PR containing some tests to highlight the unexpected behaviors? |
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.
LGTM
FYI @nodejs/assert @nodejs/test_runner |
Landed in 10cce65 |
PR-URL: nodejs#55474 Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
PR-URL: #55474 Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Fixes a small issue introduced in #54862
The check that was comparing the total string length to decide if the comparison was long enough to pick between the "stacked" diff or the "simple" one, was not considering the double quotes surrounding
actual
andexpected
when they are strings