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 <anna@addaleax.net>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
This commit is contained in:
juggernaut451 2018-03-03 00:58:29 +05:30 committed by Ruben Bridgewater
parent f3e107aeef
commit cbc7eb7eec
No known key found for this signature in database
GPG Key ID: F07496B3EB3C1762

View File

@ -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();
});
}));