From 068f92cf420e2693c79c71474f4994e5c46810f0 Mon Sep 17 00:00:00 2001 From: rajatk Date: Thu, 1 Dec 2016 09:47:46 -0600 Subject: [PATCH] test: var to const/let in test-tls-set-ciphers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit this change is part of code and learn (NINA-2016) PR-URL: https://github.com/nodejs/node/pull/9877 Reviewed-By: Colin Ihrig Reviewed-By: Prince John Wesley Reviewed-By: Luigi Pinca Reviewed-By: Michaƫl Zasso Reviewed-By: James M Snell --- test/parallel/test-tls-set-ciphers.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/test/parallel/test-tls-set-ciphers.js b/test/parallel/test-tls-set-ciphers.js index 4d9274b184232d..5a85e3b22e4c62 100644 --- a/test/parallel/test-tls-set-ciphers.js +++ b/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); }));