-
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: refactor the code in test-http-keep-alive #10350
Conversation
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 pending CI.
|
||
var server = http.createServer(function(req, res) { | ||
const server = http.createServer(common.mustCall((req, res) => { | ||
res.writeHead(200, {'Content-Length': body.length}); |
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.
nit: since you are only using body
on this function, is going to be cleaner if you move the const declaration to this scope
* use common.mustCall to control the functions execution automatically * use let and const instead of var * use assert.strictEqual instead assert.equal
0c1b1bb
to
53a872a
Compare
@italoacasas implemented as suggested |
Landed 1e98ea3 |
* use common.mustCall to control the functions execution automatically * use let and const instead of var * use assert.strictEqual instead assert.equal PR-URL: #10350 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Italo A. Casas <me@italoacasas.com>
* use common.mustCall to control the functions execution automatically * use let and const instead of var * use assert.strictEqual instead assert.equal PR-URL: #10350 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Italo A. Casas <me@italoacasas.com>
* use common.mustCall to control the functions execution automatically * use let and const instead of var * use assert.strictEqual instead assert.equal PR-URL: #10350 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Italo A. Casas <me@italoacasas.com>
* use common.mustCall to control the functions execution automatically * use let and const instead of var * use assert.strictEqual instead assert.equal PR-URL: #10350 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Italo A. Casas <me@italoacasas.com>
* use common.mustCall to control the functions execution automatically * use let and const instead of var * use assert.strictEqual instead assert.equal PR-URL: #10350 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Italo A. Casas <me@italoacasas.com>
* use common.mustCall to control the functions execution automatically * use let and const instead of var * use assert.strictEqual instead assert.equal PR-URL: #10350 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Italo A. Casas <me@italoacasas.com>
* use common.mustCall to control the functions execution automatically * use let and const instead of var * use assert.strictEqual instead assert.equal PR-URL: #10350 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Italo A. Casas <me@italoacasas.com>
* use common.mustCall to control the functions execution automatically * use let and const instead of var * use assert.strictEqual instead assert.equal PR-URL: #10350 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Italo A. Casas <me@italoacasas.com>
* use common.mustCall to control the functions execution automatically * use let and const instead of var * use assert.strictEqual instead assert.equal PR-URL: #10350 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Italo A. Casas <me@italoacasas.com>
* use common.mustCall to control the functions execution automatically * use let and const instead of var * use assert.strictEqual instead assert.equal PR-URL: #10350 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Italo A. Casas <me@italoacasas.com>
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
test
Description of change