From 943d0853076437896963975d039e7786e5f74192 Mon Sep 17 00:00:00 2001 From: dave-k Date: Thu, 30 Mar 2017 11:41:38 -0700 Subject: [PATCH] test: add a second argument to assert.throws() - a regular expression that matches the entire error message. PR-URL: https://github.com/nodejs/node/pull/12139 Reviewed-By: Rich Trott Reviewed-By: Richard Lau Reviewed-By: Colin Ihrig Reviewed-By: Luigi Pinca Reviewed-By: James M Snell Reviewed-By: Prince John Wesley --- test/addons/make-callback-recurse/test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/addons/make-callback-recurse/test.js b/test/addons/make-callback-recurse/test.js index 46b1327d7de..895769bc330 100644 --- a/test/addons/make-callback-recurse/test.js +++ b/test/addons/make-callback-recurse/test.js @@ -15,7 +15,7 @@ assert.throws(function() { makeCallback({}, function() { throw new Error('hi from domain error'); }); -}); +}, /^Error: hi from domain error$/); // Check the execution order of the nextTickQueue and MicrotaskQueue in