diff --git a/test/parallel/test-tls-no-cert-required.js b/test/parallel/test-tls-no-cert-required.js index 3c7cf4462fcd07..001f6443c1b026 100644 --- a/test/parallel/test-tls-no-cert-required.js +++ b/test/parallel/test-tls-no-cert-required.js @@ -20,7 +20,8 @@ tls.createServer(assert.fail) tls.createServer({}) .listen(0, common.mustCall(close)); -assert.throws(() => tls.createServer('this is not valid'), TypeError); +assert.throws(() => tls.createServer('this is not valid'), + /^TypeError: options must be an object$/); tls.createServer() .listen(0, common.mustCall(close));