node/test/parallel/test-tls-clientcertengine-invalid-arg-type.js
Mithun Sasidharan eae0c05697
test: replace assert.throws w/ common.expectsError
PR-URL: https://github.com/nodejs/node/pull/17498
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
2017-12-08 16:02:07 -05:00

15 lines
310 B
JavaScript

'use strict';
const common = require('../common');
if (!common.hasCrypto)
common.skip('missing crypto');
const tls = require('tls');
{
common.expectsError(
() => { tls.createSecureContext({ clientCertEngine: 0 }); },
{ code: 'ERR_INVALID_ARG_TYPE',
message: / Received type number$/ });
}