-
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
Test stream writable state #21292
Test stream writable state #21292
Conversation
Removes the string error from the assertion call to improve the error message shown on screen when the test fails.
@@ -7,7 +7,8 @@ const stream = require('stream'); | |||
const writable = new stream.Writable(); | |||
|
|||
writable._writev = common.mustCall((chunks, cb) => { | |||
assert.strictEqual(chunks.length, 2, 'two chunks to write'); | |||
//error: two chunks to write |
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 the comment can be removed. Maybe it's just me but I don't find it useful.
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 agree. This will also fail our linter due to the lack of a space after //
.
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.
Hello both, thanks for the comments, I've added a new commit to this PR to remove the comment.
Let me know what you think.
Cheers
Removing a code comment with the error message, due to feedback from reviewers reviewers: Ipinca, apapirovski
Removes the string error from the assertion call to improve the error message shown on screen when the test fails. PR-URL: nodejs#21292 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Landed in fd520e7. Thank you @deleteman for your first contribution to Node.js! |
Removes the string error from the assertion call to improve the error message shown on screen when the test fails. PR-URL: #21292 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
First contribution here, this one cleans up one of the test cases to improve the error message thrown when the test fails.
It used to be in the form of:
AssertionError [ERR_ASSERTION]: two chunks to write
Now, with this change, error message is in the form of:
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes