Closed
Conversation
1) Switched + / - and red / green in diffs. It seems like that style is more natural to most people. 2) Short primitives do not use the diff anymore. Especially short numbers can be read well like 1 !== 2. Cases that can not be displayed like that (e.g., -0 and +0) use the regular diff output. 3) Improved error descriptions. It was not always clear what the messages stood for. That should now be resolved. 4) Added a position indicator for single lines in case a tty is used and the line is shorter than the visual columns. 5) Color detection is now done by checking stderr instead of stdout. PR-URL: nodejs#21628 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
So far the error message from a loose assertion is not always very informative and could be misleading. This is fixed by: * showing more from the actual error message * having a better error description * not using custom inspection * inspecting a higher depth * inspecting the full array instead of up to 100 entries PR-URL: nodejs#22155 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
The output is now a tiny bit improved by sorting object properties when inspecting the values that are compared with each other. That reduces the overall diff for identical objects with a different property insertion order. PR-URL: nodejs#22788 Refs: nodejs#22763 Reviewed-By: John-David Dalton <john.david.dalton@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Contributor
Author
Member
|
Hm, the first commit (#21628) is semver-major. It should not be backported. We might decide otherwise if the TSC agrees to that (pretty much any assert PR will have to be backported manually if that PR is not backported as well, since it changes the actual / expected order). |
Member
|
What do others think about backporting it to 10? |
Contributor
Author
|
I haven't noticed that it's semver-major and that commit is a big change, I think. I would close this PR. @BridgeAR I'm sorry to be such a bother. |
Member
|
@oyyd no, we have to thank you for opening the PR and investing your time into this! :-) |
Contributor
Author
|
Thanks :) |
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.
Backport of #21628, #22155, #22788. Closes #22711.
Only modify one line code of tests to match #20857.
make -j4 test(UNIX), orvcbuild test(Windows) passes