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 <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Prince John Wesley <[email protected]>
  • Loading branch information
dave-k authored and vsemozhetbyt committed Apr 7, 2017
1 parent a94a5da commit 943d085
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 943d085

Please sign in to comment.