-
Notifications
You must be signed in to change notification settings - Fork 30k
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
test: include value to assert message #15970
Conversation
@@ -20,13 +23,13 @@ assert.strictEqual(zlib.gunzipSync(data).toString(), 'abcdef'); | |||
zlib.gunzip(data, common.mustCall((err, result) => { | |||
assert.ifError(err); | |||
assert.strictEqual(result.toString(), 'abcdef', | |||
'result should match original string'); | |||
'result should match original string: ' + (abc + def)); |
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.
The more important part is actually what result.toString()
looks like. Please change it to something like
`${result.toString()} should equal ${abc + def}`
Hi Ruben
Thanks for the comment
I have modified the code and checked in.
This is my first time contributing to Node. Please let me know if I missed any steps.
ThanksHazel
Sent from my Samsung Galaxy smartphone.
-------- Original message --------From: Ruben Bridgewater <notifications@github.com> Date: 10/7/17 10:47 AM (GMT-08:00) To: nodejs/node <node@noreply.github.com> Cc: hwaisiu <hazelsiu@gmail.com>, Author <author@noreply.github.com> Subject: Re: [nodejs/node] test: include value to assert message (#15970)
@BridgeAR commented on this pull request.
In test/parallel/test-zlib-from-concatenated-gzip.js:
@@ -20,13 +23,13 @@ assert.strictEqual(zlib.gunzipSync(data).toString(), 'abcdef');
zlib.gunzip(data, common.mustCall((err, result) => {
assert.ifError(err);
assert.strictEqual(result.toString(), 'abcdef',
- 'result should match original string');
+ 'result should match original string: ' + (abc + def));
The more important part is actually what result.toString() looks like. Please change it to something like
`${result.toString()} should equal ${abc + def}`
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/nodejs/node","title":"nodejs/node","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/nodejs/node"}},"updates":{"snippets":[{"icon":"PERSON","message":"@BridgeAR commented on #15970"}],"action":{"name":"View Pull Request","url":"#15970 (review)"}}}
|
@hwaisiu Hi, have you pushed your changes to your branch ( $ git checkout node-dev # or other branch name that you have in your local repo that points to this PR
# make changes
$ git commit --amend # You can leave the commit message as-is in the editor
$ git push --force hwaisiu node-dev # assuming "hwaisiu" is pointing to your forked repository |
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 with @BridgeAR's suggestion
…ting First member
test: because of length limit of message
I got a 403 error after I entered: |
I think I have figured out how to push the changes. Thanks |
assert.strictEqual(result.toString(), 'abc', | ||
'result should match contents of first "member"'); | ||
assert.strictEqual(result.toString(), abc, | ||
`First "member": ${result.toString()} === ${abc}`); |
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.
I think this is actually more readable if the assertion message is removed.
Just a note for a potential next PR - the commit messages do not follow the guidelines. |
PR-URL: #15970 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Landed in ef96b05 Thanks for the PR, and congratulations on becoming a Node.js Contributor 🎉 ! |
PR-URL: #15970 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
PR-URL: nodejs/node#15970 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
PR-URL: #15970 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
PR-URL: #15970 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
PR-URL: #15970 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
PR-URL: nodejs/node#15970 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)