test: more useful assert messaging for child-process-execSync#15972
Closed
ericljpemberton wants to merge 1 commit intonodejs:masterfrom
Closed
test: more useful assert messaging for child-process-execSync#15972ericljpemberton wants to merge 1 commit intonodejs:masterfrom
ericljpemberton wants to merge 1 commit intonodejs:masterfrom
Conversation
BridgeAR
approved these changes
Oct 7, 2017
BridgeAR
reviewed
Oct 7, 2017
|
|
||
| assert.strictEqual(ret.length, msgBuf.length); | ||
| assert.deepStrictEqual(ret, msgBuf, 'execSync result buffer should match'); | ||
| assert.deepStrictEqual(ret, msgBuf); |
Member
There was a problem hiding this comment.
The returned error message is not going to be great here and therefore it might be better to use a error message that includes both buffers. But this should not be blocking.
Contributor
Author
There was a problem hiding this comment.
@BridgeAR When I run assert.deepStrictEqual in the default behavior using foobar (as in the test) and foobaz the default assertion thrown is this:
AssertionError: <Buffer 66 6f 6f 62 61 7a 0a> deepStrictEqual <Buffer 66 6f 6f 62 61 72 0a>
Are you saying that I should change it to look something like the following?:
AssertionError: ret <Buffer 66 6f 6f 62 61 7a 0a> and msgBuf <Buffer 66 6f 6f 62 61 72 0a> should be equal
BridgeAR
pushed a commit
to BridgeAR/node
that referenced
this pull request
Oct 8, 2017
PR-URL: nodejs#15972 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Member
|
Landed in 55bb9c4 Thanks for the PR, and congratulations on becoming a Node.js Contributor 🎉 ! |
MylesBorins
pushed a commit
that referenced
this pull request
Oct 11, 2017
PR-URL: #15972 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Merged
addaleax
pushed a commit
to addaleax/ayo
that referenced
this pull request
Oct 12, 2017
PR-URL: nodejs/node#15972 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
MylesBorins
pushed a commit
that referenced
this pull request
Oct 17, 2017
PR-URL: #15972 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Merged
MylesBorins
pushed a commit
that referenced
this pull request
Oct 18, 2017
PR-URL: #15972 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
MylesBorins
pushed a commit
that referenced
this pull request
Oct 25, 2017
PR-URL: #15972 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Merged
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.
This is a commit for Node Interactive. I changed some basic assertion messages to hopefully provide better insights into errors.
Checklist
make -j4 test(UNIX)Affected core subsystem(s)
tests