-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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: refactor test-pipe-file-to-http #10054
Conversation
s.pipe(req); | ||
s.on('close', function(err) { | ||
s.on('close', common.mustCall((err) => { | ||
if (err) throw err; | ||
clientReqComplete = true; |
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.
Because this is now in a common.mustCall()
, you should be able to remove clientReqComplete
from the test completely.
s.pipe(req); | ||
s.on('close', function(err) { | ||
s.on('close', common.mustCall((err) => { | ||
if (err) throw err; |
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.
You can replace this with assert.ifError(err);
Ping @JoshuaMays: Are you able to update this to accommodate the comments from @cjihrig? Do you need a little more explanation on one or both of the comments? |
Changing var defs to const/let, changing assert.equal to assert.strictEqual. Wrapping functions called once with common.mustCall
21625a7
to
2bfa353
Compare
Because this had been dormant for some time, I went ahead and addressed @cjihrig's nits and pushed directly to your branch, @JoshuaMays. Hope that's OK! @cjihrig Can you take a look and, if appropriate, update your review? Thanks! |
Changing var defs to const/let, changing assert.equal to assert.strictEqual. Wrapping functions called once with common.mustCall PR-URL: nodejs#10054 Reviewed-By: Colin Ihrig <[email protected]>
Landed in 00da58d. |
Changing var defs to const/let, changing assert.equal to assert.strictEqual. Wrapping functions called once with common.mustCall PR-URL: #10054 Reviewed-By: Colin Ihrig <[email protected]>
Changing var defs to const/let, changing assert.equal to assert.strictEqual. Wrapping functions called once with common.mustCall PR-URL: #10054 Reviewed-By: Colin Ihrig <[email protected]>
Changing var defs to const/let, changing assert.equal to assert.strictEqual. Wrapping functions called once with common.mustCall PR-URL: #10054 Reviewed-By: Colin Ihrig <[email protected]>
Changing var defs to const/let, changing assert.equal to assert.strictEqual. Wrapping functions called once with common.mustCall PR-URL: #10054 Reviewed-By: Colin Ihrig <[email protected]>
Changing var defs to const/let, changing assert.equal to assert.strictEqual. Wrapping functions called once with common.mustCall PR-URL: #10054 Reviewed-By: Colin Ihrig <[email protected]>
Changing var defs to const/let, changing assert.equal to assert.strictEqual. Wrapping functions called once with common.mustCall PR-URL: #10054 Reviewed-By: Colin Ihrig <[email protected]>
Changing var defs to const/let, changing assert.equal to assert.strictEqual. Wrapping functions called once with common.mustCall PR-URL: #10054 Reviewed-By: Colin Ihrig <[email protected]>
Checklist
make -j8 test
(UNIX), orvcbuild test nosign
(Windows) passesAffected core subsystem(s)
Description of change
Changing var defs to const/let, changing assert.equal to
assert.strictEqual. Wrapping functions called once with
common.mustCall