Skip to content

Commit 7874cb0

Browse files
juggernaut451MylesBorins
authored andcommitted
test: refactor parallel/test-tls-addca
PR-URL: #18798 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Matheus Marchini <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Daniel Bevenius <[email protected]> Reviewed-By: Tobias Nießen <[email protected]>
1 parent b3b5ac5 commit 7874cb0

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

test/parallel/test-tls-addca.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
'use strict';
2-
require('../common');
2+
const common = require('../common');
33
const fixtures = require('../common/fixtures');
44

55
// Adding a CA certificate to contextWithCert should not also add it to
@@ -32,7 +32,7 @@ clientOptions.secureContext = contextWithoutCert;
3232
connect({
3333
client: clientOptions,
3434
server: serverOptions,
35-
}, function(err, pair, cleanup) {
35+
}, common.mustCall((err, pair, cleanup) => {
3636
assert(err);
3737
assert.strictEqual(err.message, 'unable to verify the first certificate');
3838
cleanup();
@@ -43,8 +43,8 @@ connect({
4343
connect({
4444
client: clientOptions,
4545
server: serverOptions,
46-
}, function(err, pair, cleanup) {
46+
}, common.mustCall((err, pair, cleanup) => {
4747
assert.ifError(err);
4848
cleanup();
49-
});
50-
});
49+
}));
50+
}));

0 commit comments

Comments
 (0)