summaryrefslogtreecommitdiff
path: root/test/parallel/test-regress-GH-4948.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/parallel/test-regress-GH-4948.js')
-rw-r--r--test/parallel/test-regress-GH-4948.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/parallel/test-regress-GH-4948.js b/test/parallel/test-regress-GH-4948.js
index 69f4e47324..196c973cd0 100644
--- a/test/parallel/test-regress-GH-4948.js
+++ b/test/parallel/test-regress-GH-4948.js
@@ -4,8 +4,8 @@
require('../common');
const http = require('http');
-var reqCount = 0;
-var server = http.createServer(function(serverReq, serverRes) {
+let reqCount = 0;
+const server = http.createServer(function(serverReq, serverRes) {
if (reqCount) {
serverRes.end();
server.close();
@@ -16,8 +16,8 @@ var server = http.createServer(function(serverReq, serverRes) {
// normally the use case would be to call an external site
// does not require connecting locally or to itself to fail
- var r = http.request({hostname: 'localhost',
- port: this.address().port}, function(res) {
+ const r = http.request({hostname: 'localhost',
+ port: this.address().port}, function(res) {
// required, just needs to be in the client response somewhere
serverRes.end();
@@ -33,7 +33,7 @@ var server = http.createServer(function(serverReq, serverRes) {
// simulate a client request that closes early
const net = require('net');
- var sock = new net.Socket();
+ const sock = new net.Socket();
sock.connect(this.address().port, 'localhost');
sock.on('connect', function() {