diff options
Diffstat (limited to 'test/parallel/test-http-url.parse-auth-with-header-in-request.js')
-rw-r--r-- | test/parallel/test-http-url.parse-auth-with-header-in-request.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/test/parallel/test-http-url.parse-auth-with-header-in-request.js b/test/parallel/test-http-url.parse-auth-with-header-in-request.js index 9781cefcbd..d91ec75f60 100644 --- a/test/parallel/test-http-url.parse-auth-with-header-in-request.js +++ b/test/parallel/test-http-url.parse-auth-with-header-in-request.js @@ -9,7 +9,7 @@ function check(request) { assert.strictEqual(request.headers.authorization, 'NoAuthForYOU'); } -var server = http.createServer(function(request, response) { +const server = http.createServer(function(request, response) { // run the check function check.call(this, request, response); response.writeHead(200, {}); @@ -18,7 +18,8 @@ var server = http.createServer(function(request, response) { }); server.listen(0, function() { - var testURL = url.parse(`http://asdf:qwer@localhost:${this.address().port}`); + const testURL = url.parse('http://asdf:qwer@localhost:' + + `${this.address().port}`); // the test here is if you set a specific authorization header in the // request we should not override that with basic auth testURL.headers = { |