diff options
author | James M Snell <jasnell@gmail.com> | 2017-07-14 15:05:24 -0700 |
---|---|---|
committer | James M Snell <jasnell@gmail.com> | 2017-07-24 14:16:49 -0700 |
commit | b0a8a7c6baccea746da10e01bfb3dec18c0d723e (patch) | |
tree | 3bdf54ff6e3daa9c6ac9816914c7a51b892021dd /test/parallel/test-http-agent-null.js | |
parent | ed21cb1774d3e146f84a94400db0008a940656c3 (diff) | |
download | android-node-v8-b0a8a7c6baccea746da10e01bfb3dec18c0d723e.tar.gz android-node-v8-b0a8a7c6baccea746da10e01bfb3dec18c0d723e.tar.bz2 android-node-v8-b0a8a7c6baccea746da10e01bfb3dec18c0d723e.zip |
test: improvements to various http tests
* Add common/countdown utility
* Numerous improvements to http tests
PR-URL: https://github.com/nodejs/node/pull/14315
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Diffstat (limited to 'test/parallel/test-http-agent-null.js')
-rw-r--r-- | test/parallel/test-http-agent-null.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/parallel/test-http-agent-null.js b/test/parallel/test-http-agent-null.js index 784dc32211..0f87d09813 100644 --- a/test/parallel/test-http-agent-null.js +++ b/test/parallel/test-http-agent-null.js @@ -23,14 +23,14 @@ const common = require('../common'); const http = require('http'); -const server = http.createServer(common.mustCall(function(req, res) { +const server = http.createServer(common.mustCall((req, res) => { res.end(); -})).listen(0, common.mustCall(function() { +})).listen(0, common.mustCall(() => { const options = { agent: null, - port: this.address().port + port: server.address().port }; - http.get(options, common.mustCall(function(res) { + http.get(options, common.mustCall((res) => { res.resume(); server.close(); })); |