Skip to content
Browse files

test: use assert regexp in tls no cert test

Replace the `assert.throws` second argument from a Type to a `RegExp`
matching the entire error message.
Error message changes are `semver-major`, so we assert their content.

PR-URL: #12891
Refs: #12603
Reviewed-By: Refael Ackermann <>
Reviewed-By: Rich Trott <>
Reviewed-By: Colin Ihrig <>
Reviewed-By: David Cai <>
Reviewed-By: Luigi Pinca <>
Reviewed-By: Sakthipriyan Vairamani <>
Reviewed-By: James M Snell <>
  • Loading branch information
arturgvieira authored and refack committed May 10, 2017
1 parent 317180f commit cfe7b34058716d9c9dfb143ecc865a30f433db5c
Showing with 2 additions and 1 deletion.
  1. +2 −1 test/parallel/test-tls-no-cert-required.js
@@ -41,7 +41,8 @@ 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$/);

.listen(0, common.mustCall(close));

0 comments on commit cfe7b34

Please sign in to comment.
You can’t perform that action at this time.