Browse Source

test: var to const/let in test-tls-set-ciphers

this change is part of code and learn (NINA-2016)

PR-URL: https://github.com/nodejs/node/pull/9877
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
v6.x
rajatk 8 years ago
committed by Anna Henningsen
parent
commit
c5bfe90900
No known key found for this signature in database GPG Key ID: D8B9F5AEAE84E4CF
  1. 18
      test/parallel/test-tls-set-ciphers.js

18
test/parallel/test-tls-set-ciphers.js

@ -1,5 +1,5 @@
'use strict';
var common = require('../common');
const common = require('../common');
if (!common.opensslCli) {
common.skip('node compiled without OpenSSL CLI.');
@ -11,25 +11,25 @@ if (!common.hasCrypto) {
return;
}
var assert = require('assert');
var exec = require('child_process').exec;
var tls = require('tls');
var fs = require('fs');
const assert = require('assert');
const exec = require('child_process').exec;
const tls = require('tls');
const fs = require('fs');
var options = {
const options = {
key: fs.readFileSync(common.fixturesDir + '/keys/agent2-key.pem'),
cert: fs.readFileSync(common.fixturesDir + '/keys/agent2-cert.pem'),
ciphers: 'DES-CBC3-SHA'
};
var reply = 'I AM THE WALRUS'; // something recognizable
var response = '';
const reply = 'I AM THE WALRUS'; // something recognizable
let response = '';
process.on('exit', function() {
assert.notEqual(response.indexOf(reply), -1);
});
var server = tls.createServer(options, common.mustCall(function(conn) {
const server = tls.createServer(options, common.mustCall(function(conn) {
conn.end(reply);
}));

Loading…
Cancel
Save