The Wayback Machine - https://web.archive.org/web/20220321140337/https://github.com/nodejs/node/pull/10054
Skip to content
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

Closed

Conversation

JoshuaMays
Copy link
Contributor

@JoshuaMays JoshuaMays commented Dec 1, 2016

Checklist
  • make -j8 test (UNIX), or vcbuild test nosign (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines
Affected 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

s.pipe(req);
s.on('close', function(err) {
s.on('close', common.mustCall((err) => {
if (err) throw err;
clientReqComplete = true;
Copy link
Contributor

@cjihrig cjihrig Dec 3, 2016

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;
Copy link
Contributor

@cjihrig cjihrig Dec 3, 2016

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);

@mscdex mscdex added the http label Dec 3, 2016
@Trott
Copy link
Member

@Trott Trott commented Dec 22, 2016

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
@Trott
Copy link
Member

@Trott Trott commented Dec 24, 2016

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!

@Trott
Copy link
Member

@Trott Trott commented Dec 24, 2016

Trott added a commit to Trott/io.js that referenced this issue Dec 24, 2016
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 <cjihrig@gmail.com>
@Trott
Copy link
Member

@Trott Trott commented Dec 24, 2016

Landed in 00da58d.
Thanks for the contribution! 🎉

@Trott Trott closed this Dec 24, 2016
targos added a commit that referenced this issue Dec 26, 2016
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 <cjihrig@gmail.com>
@MylesBorins MylesBorins mentioned this pull request Dec 27, 2016
targos added a commit that referenced this issue Dec 28, 2016
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 <cjihrig@gmail.com>
evanlucas added a commit that referenced this issue Jan 3, 2017
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 <cjihrig@gmail.com>
evanlucas added a commit that referenced this issue Jan 4, 2017
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 <cjihrig@gmail.com>
MylesBorins added a commit that referenced this issue Jan 23, 2017
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 <cjihrig@gmail.com>
MylesBorins added a commit that referenced this issue Jan 24, 2017
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 <cjihrig@gmail.com>
@MylesBorins MylesBorins mentioned this pull request Jan 24, 2017
MylesBorins added a commit that referenced this issue Feb 1, 2017
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 <cjihrig@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

7 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.