From d5d7db4a868ae02bcf08b230f42e8b752d1511af Mon Sep 17 00:00:00 2001 From: Raja Panidepu Date: Thu, 1 Dec 2016 10:34:33 -0600 Subject: [PATCH] tests: update test-tls-no-cert-required Change var to const. Wrap callback of createServer with common.mustCall. --- test/parallel/test-tls-no-cert-required.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/test/parallel/test-tls-no-cert-required.js b/test/parallel/test-tls-no-cert-required.js index de723e73e8a335..2b5d78576da0cd 100644 --- a/test/parallel/test-tls-no-cert-required.js +++ b/test/parallel/test-tls-no-cert-required.js @@ -1,15 +1,16 @@ 'use strict'; -var common = require('../common'); +const common = require('../common'); if (!common.hasCrypto) { common.skip('missing crypto'); return; } -var tls = require('tls'); +const tls = require('tls'); // Omitting the cert or pfx option to tls.createServer() should not throw. // AECDH-NULL-SHA is a no-authentication/no-encryption cipher and hence // doesn't need a certificate. -tls.createServer({ ciphers: 'AECDH-NULL-SHA' }).listen(0, function() { - this.close(); -}); +tls.createServer({ ciphers: 'AECDH-NULL-SHA' }) + .listen(0, common.mustCall(function() { + this.close(); + }));