diff options
Diffstat (limited to 'test/parallel/test-http-agent-false.js')
-rw-r--r-- | test/parallel/test-http-agent-false.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/parallel/test-http-agent-false.js b/test/parallel/test-http-agent-false.js index 65da4b836a..5c9907bb70 100644 --- a/test/parallel/test-http-agent-false.js +++ b/test/parallel/test-http-agent-false.js @@ -6,7 +6,7 @@ const http = require('http'); // sending `agent: false` when `port: null` is also passed in (i.e. the result // of a `url.parse()` call with the default port used, 80 or 443), should not // result in an assertion error... -var opts = { +const opts = { host: '127.0.0.1', port: null, path: '/', @@ -14,7 +14,7 @@ var opts = { agent: false }; -var good = false; +let good = false; process.on('exit', function() { assert(good, 'expected either an "error" or "response" event'); }); @@ -22,7 +22,7 @@ process.on('exit', function() { // we just want an "error" (no local HTTP server on port 80) or "response" // to happen (user happens ot have HTTP server running on port 80). // As long as the process doesn't crash from a C++ assertion then we're good. -var req = http.request(opts); +const req = http.request(opts); req.on('response', function(res) { good = true; }); |