mirror of
https://github.com/nodejs/node.git
synced 2026-11-30 11:55:44 -05:00
test: use eslint to fix var->const/let
Manually fix issues that eslint --fix couldn't do automatically. Backport-PR-URL: https://github.com/nodejs/node/pull/11775 PR-URL: https://github.com/nodejs/node/pull/10685 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io>
This commit is contained in:
1 parent
de63698066
commit
db61c952de
806 files changed
+5031
-4995
No files matched your search
@@ -1,10 +1,10 @@
|
||||
'use strict';
|
||||
require('../common');
|
||||
var assert = require('assert');
|
||||
var http = require('http');
|
||||
var url = require('url');
|
||||
const assert = require('assert');
|
||||
const http = require('http');
|
||||
const url = require('url');
|
||||
|
||||
var testURL;
|
||||
let testURL;
|
||||
|
||||
// make sure the basics work
|
||||
function check(request) {
|
||||
@@ -17,7 +17,7 @@ function check(request) {
|
||||
testURL.hostname + ':' + testURL.port);
|
||||
}
|
||||
|
||||
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, {});
|
||||
@@ -29,7 +29,7 @@ server.listen(0, function() {
|
||||
testURL = url.parse(`http://localhost:${this.address().port}`);
|
||||
|
||||
// make the request
|
||||
var clientRequest = http.request(testURL);
|
||||
const clientRequest = http.request(testURL);
|
||||
// since there is a little magic with the agent
|
||||
// make sure that an http request uses the http.Agent
|
||||
assert.ok(clientRequest.agent instanceof http.Agent);
|
||||
|
||||
Reference in new issue
Block a user