mirror of
https://github.com/nodejs/node.git
synced 2025-08-15 13:48:44 +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
|
@ -12,7 +12,7 @@ const url = require('url');
|
|||
const fs = require('fs');
|
||||
|
||||
// https options
|
||||
var httpsOptions = {
|
||||
const httpsOptions = {
|
||||
key: fs.readFileSync(common.fixturesDir + '/keys/agent1-key.pem'),
|
||||
cert: fs.readFileSync(common.fixturesDir + '/keys/agent1-cert.pem')
|
||||
};
|
||||
|
@ -22,7 +22,7 @@ function check(request) {
|
|||
assert.ok(request.socket._secureEstablished);
|
||||
}
|
||||
|
||||
var server = https.createServer(httpsOptions, function(request, response) {
|
||||
const server = https.createServer(httpsOptions, function(request, response) {
|
||||
// run the check function
|
||||
check.call(this, request, response);
|
||||
response.writeHead(200, {});
|
||||
|
@ -31,11 +31,11 @@ var server = https.createServer(httpsOptions, function(request, response) {
|
|||
});
|
||||
|
||||
server.listen(0, function() {
|
||||
var testURL = url.parse(`https://localhost:${this.address().port}`);
|
||||
const testURL = url.parse(`https://localhost:${this.address().port}`);
|
||||
testURL.rejectUnauthorized = false;
|
||||
|
||||
// make the request
|
||||
var clientRequest = https.request(testURL);
|
||||
const clientRequest = https.request(testURL);
|
||||
// since there is a little magic with the agent
|
||||
// make sure that the request uses the https.Agent
|
||||
assert.ok(clientRequest.agent instanceof https.Agent);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue