Skip to content

Commit de792dc

Browse files
Matt WebbMylesBorins
Matt Webb
authored andcommitted
test: Updating vars to const and tsl server test
PR-URL: #9874 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent c5c3ab7 commit de792dc

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed
+8-8
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
'use strict';
2-
var common = require('../common');
2+
const common = require('../common');
33

44
if (!common.hasCrypto) {
55
common.skip('missing crypto');
66
return;
77
}
8-
var tls = require('tls');
8+
const tls = require('tls');
99

10-
var net = require('net');
11-
var fs = require('fs');
10+
const net = require('net');
11+
const fs = require('fs');
1212

13-
var options = {
13+
const options = {
1414
key: fs.readFileSync(common.fixturesDir + '/keys/agent1-key.pem'),
1515
cert: fs.readFileSync(common.fixturesDir + '/keys/agent1-cert.pem'),
1616
handshakeTimeout: 50
1717
};
1818

19-
var server = tls.createServer(options, common.fail);
19+
const server = tls.createServer(options, common.fail);
2020

2121
server.on('tlsClientError', common.mustCall(function(err, conn) {
2222
conn.destroy();
2323
server.close();
2424
}));
2525

26-
server.listen(0, function() {
26+
server.listen(0, common.mustCall(function() {
2727
net.connect({ host: '127.0.0.1', port: this.address().port });
28-
});
28+
}));

0 commit comments

Comments
 (0)