From cbc7eb7eecf8fa698ba3a02e1a73cb2db67daf89 Mon Sep 17 00:00:00 2001 From: juggernaut451 Date: Sat, 3 Mar 2018 00:58:29 +0530 Subject: [PATCH] test: refactor parallel/test-tls-cert-chains-concat Added common.mustCall and replaced function with arrow function. PR-URL: https://github.com/nodejs/node/pull/19096 Fixes: https://github.com/nodejs/node/issues/14544 Reviewed-By: Anna Henningsen Reviewed-By: Benjamin Gruenbaum Reviewed-By: Colin Ihrig Reviewed-By: James M Snell Reviewed-By: Sakthipriyan Vairamani --- test/parallel/test-tls-cert-chains-concat.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/parallel/test-tls-cert-chains-concat.js b/test/parallel/test-tls-cert-chains-concat.js index aeb37a8696cf69..88f3d3348c37d4 100644 --- a/test/parallel/test-tls-cert-chains-concat.js +++ b/test/parallel/test-tls-cert-chains-concat.js @@ -1,5 +1,5 @@ 'use strict'; -require('../common'); +const common = require('../common'); const fixtures = require('../common/fixtures'); // Check cert chain is received by client, and is completed with the ca cert @@ -19,7 +19,7 @@ connect({ cert: keys.agent6.cert, key: keys.agent6.key, }, -}, function(err, pair, cleanup) { +}, common.mustCall((err, pair, cleanup) => { assert.ifError(err); const peer = pair.client.conn.getPeerCertificate(); @@ -47,4 +47,4 @@ connect({ assert.deepStrictEqual(pair.server.conn.getPeerCertificate(true), {}); return cleanup(); -}); +}));