From 1bad9df8fd949c716cca132464227e8bbf42f8ee Mon Sep 17 00:00:00 2001 From: juggernaut451 Date: Thu, 15 Feb 2018 21:19:03 +0530 Subject: [PATCH] test: refactor parallel/test-tls-addca MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/18798 Reviewed-By: Richard Lau Reviewed-By: Colin Ihrig Reviewed-By: James M Snell Reviewed-By: Matheus Marchini Reviewed-By: Luigi Pinca Reviewed-By: Daniel Bevenius Reviewed-By: Tobias Nießen --- test/parallel/test-tls-addca.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/parallel/test-tls-addca.js b/test/parallel/test-tls-addca.js index 034334a7e41bf3..8eb88db6291457 100644 --- a/test/parallel/test-tls-addca.js +++ b/test/parallel/test-tls-addca.js @@ -1,5 +1,5 @@ 'use strict'; -require('../common'); +const common = require('../common'); const fixtures = require('../common/fixtures'); // Adding a CA certificate to contextWithCert should not also add it to @@ -32,7 +32,7 @@ clientOptions.secureContext = contextWithoutCert; connect({ client: clientOptions, server: serverOptions, -}, function(err, pair, cleanup) { +}, common.mustCall((err, pair, cleanup) => { assert(err); assert.strictEqual(err.message, 'unable to verify the first certificate'); cleanup(); @@ -43,8 +43,8 @@ connect({ connect({ client: clientOptions, server: serverOptions, - }, function(err, pair, cleanup) { + }, common.mustCall((err, pair, cleanup) => { assert.ifError(err); cleanup(); - }); -}); + })); +}));