Skip to content

Commit

Permalink
test: var to const/let in test-tls-set-ciphers
Browse files Browse the repository at this point in the history
this change is part of code and learn (NINA-2016)

PR-URL: #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>
  • Loading branch information
rajatkumar authored and addaleax committed Dec 5, 2016
1 parent f3eb8b1 commit 13cc6a0
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions test/parallel/test-tls-set-ciphers.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use strict';
var common = require('../common');
const common = require('../common');

if (!common.opensslCli) {
common.skip('node compiled without OpenSSL CLI.');
Expand All @@ -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);
}));

Expand Down

0 comments on commit 13cc6a0

Please sign in to comment.