Permalink
Browse files

test: add a second argument to assert.throws()

- a regular expression that matches the entire error message.

PR-URL: #12139
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com>
  • Loading branch information...
dave-k authored and vsemozhetbyt committed Mar 30, 2017
1 parent a94a5da commit 943d0853076437896963975d039e7786e5f74192
Showing with 1 addition and 1 deletion.
  1. +1 −1 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

0 comments on commit 943d085

Please sign in to comment.