Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit dc76a20

Browse filesBrowse files
Matt Webbaddaleax
authored andcommitted
test: Updating vars to const and tsl server test
PR-URL: #9874 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 63fafb8 commit dc76a20
Copy full SHA for dc76a20

File tree

Expand file treeCollapse file tree

1 file changed

+8
-8
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+8
-8
lines changed
Open diff view settings
Collapse file
+8-8Lines changed: 8 additions & 8 deletions
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.