test: refactor the code in test-http-connect#10397
test: refactor the code in test-http-connect#10397edsadr wants to merge 1 commit intonodejs:masterfrom
Conversation
test/parallel/test-http-connect.js
Outdated
There was a problem hiding this comment.
I would avoid adding common.mustCall() to the data handler. The number of events emitted can potentially be different, and it isn't really needed for the test.
test/parallel/test-http-connect.js
Outdated
test/parallel/test-http-connect.js
Outdated
There was a problem hiding this comment.
By using common.mustCall(), I think these variables can be eliminated completely, as can this exit event handler.
b419178 to
f936dea
Compare
|
@cjihrig , just implemented your suggestions |
test/parallel/test-http-connect.js
Outdated
There was a problem hiding this comment.
Nit: can't this be removed now? I mean the clientRequestClosed flag.
f936dea to
dfd7a21
Compare
|
@lpinca removed as suggested, please set the CI again |
test/parallel/test-http-connect.js
Outdated
There was a problem hiding this comment.
Nit: this can also probably be removed.
test/parallel/test-http-connect.js
Outdated
* use common.mustCall to control the functions execution automatically * use let and const instead of var * use assert.strictEqual instead of assert.equal * use arrow functions * remove console.error and unnecessary variables
dfd7a21 to
4dc1aae
Compare
|
@lpinca removed those too |
|
New CI before landing: https://ci.nodejs.org/job/node-test-pull-request/5635/ |
|
Landed in 72a8488. |
* use common.mustCall to control the functions execution automatically * use let and const instead of var * use assert.strictEqual instead of assert.equal * use arrow functions * remove console.error and unnecessary variables PR-URL: #10397 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
* use common.mustCall to control the functions execution automatically * use let and const instead of var * use assert.strictEqual instead of assert.equal * use arrow functions * remove console.error and unnecessary variables PR-URL: #10397 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
* use common.mustCall to control the functions execution automatically * use let and const instead of var * use assert.strictEqual instead of assert.equal * use arrow functions * remove console.error and unnecessary variables PR-URL: #10397 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
* use common.mustCall to control the functions execution automatically * use let and const instead of var * use assert.strictEqual instead of assert.equal * use arrow functions * remove console.error and unnecessary variables PR-URL: #10397 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
* use common.mustCall to control the functions execution automatically * use let and const instead of var * use assert.strictEqual instead of assert.equal * use arrow functions * remove console.error and unnecessary variables PR-URL: #10397 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
* use common.mustCall to control the functions execution automatically * use let and const instead of var * use assert.strictEqual instead of assert.equal * use arrow functions * remove console.error and unnecessary variables PR-URL: #10397 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passesAffected core subsystem(s)
test
Description of change