Skip to content

Commit

Permalink
test: add a second argument to assert.throws()
Browse files Browse the repository at this point in the history
- 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 italoacasas committed Apr 10, 2017
1 parent 3cdd04b commit ac200a6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/addons/make-callback-recurse/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ac200a6

Please sign in to comment.