Browse Source

test: replace var by const test-tls-zero-clear-in

PR-URL: https://github.com/nodejs/node/pull/8621
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ilkka Myller <ilkka.myller@nodefield.com>
v6.x
Sébastien Barbieri 8 years ago
committed by Jeremiah Senkpiel
parent
commit
9032ba60a5
  1. 16
      test/parallel/test-tls-zero-clear-in.js

16
test/parallel/test-tls-zero-clear-in.js

@ -1,19 +1,19 @@
'use strict'; 'use strict';
var common = require('../common'); const common = require('../common');
if (!common.hasCrypto) { if (!common.hasCrypto) {
common.skip('missing crypto'); common.skip('missing crypto');
return; return;
} }
var tls = require('tls'); const tls = require('tls');
var fs = require('fs'); const fs = require('fs');
var path = require('path'); const path = require('path');
var cert = fs.readFileSync(path.join(common.fixturesDir, 'test_cert.pem')); const cert = fs.readFileSync(path.join(common.fixturesDir, 'test_cert.pem'));
var key = fs.readFileSync(path.join(common.fixturesDir, 'test_key.pem')); const key = fs.readFileSync(path.join(common.fixturesDir, 'test_key.pem'));
var server = tls.createServer({ const server = tls.createServer({
cert: cert, cert: cert,
key: key key: key
}, function(c) { }, function(c) {
@ -23,7 +23,7 @@ var server = tls.createServer({
server.close(); server.close();
}, 20); }, 20);
}).listen(0, common.mustCall(function() { }).listen(0, common.mustCall(function() {
var conn = tls.connect({ const conn = tls.connect({
cert: cert, cert: cert,
key: key, key: key,
rejectUnauthorized: false, rejectUnauthorized: false,

Loading…
Cancel
Save