mirror of
https://github.com/nodejs/node.git
synced 2025-08-15 21:58:48 +02:00
test: use eslint to fix var->const/let
Manually fix issues that eslint --fix couldn't do automatically. 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:
parent
1ef401ce92
commit
7a0e462f9f
730 changed files with 3387 additions and 3368 deletions
|
@ -5,8 +5,8 @@ const assert = require('assert');
|
|||
const http = require('http');
|
||||
|
||||
|
||||
var serverSocket = null;
|
||||
var server = http.createServer(function(req, res) {
|
||||
let serverSocket = null;
|
||||
const server = http.createServer(function(req, res) {
|
||||
// They should all come in on the same server socket.
|
||||
if (serverSocket) {
|
||||
assert.equal(req.socket, serverSocket);
|
||||
|
@ -20,12 +20,12 @@ server.listen(0, function() {
|
|||
makeRequest(expectRequests);
|
||||
});
|
||||
|
||||
var agent = http.Agent({ keepAlive: true });
|
||||
const agent = http.Agent({ keepAlive: true });
|
||||
|
||||
|
||||
var clientSocket = null;
|
||||
var expectRequests = 10;
|
||||
var actualRequests = 0;
|
||||
let clientSocket = null;
|
||||
const expectRequests = 10;
|
||||
let actualRequests = 0;
|
||||
|
||||
|
||||
function makeRequest(n) {
|
||||
|
@ -35,7 +35,7 @@ function makeRequest(n) {
|
|||
return;
|
||||
}
|
||||
|
||||
var req = http.request({
|
||||
const req = http.request({
|
||||
port: server.address().port,
|
||||
path: '/' + n,
|
||||
agent: agent
|
||||
|
@ -52,7 +52,7 @@ function makeRequest(n) {
|
|||
});
|
||||
|
||||
req.on('response', function(res) {
|
||||
var data = '';
|
||||
let data = '';
|
||||
res.setEncoding('utf8');
|
||||
res.on('data', function(c) {
|
||||
data += c;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue