From 0dfb08b445f60880258be78f1827df166728c209 Mon Sep 17 00:00:00 2001 From: Artur Vieira Date: Mon, 8 May 2017 01:17:58 +0000 Subject: [PATCH] test: use assert regexp in tls no cert test Replace the assert throws second argument from a contructor to a regexp matching the entire error message. --- test/parallel/test-tls-no-cert-required.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/parallel/test-tls-no-cert-required.js b/test/parallel/test-tls-no-cert-required.js index 04a8b91cf8e354..06139307c43ce6 100644 --- a/test/parallel/test-tls-no-cert-required.js +++ b/test/parallel/test-tls-no-cert-required.js @@ -41,7 +41,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));