Skip to content

Commit ac200a6

Browse files
dave-kitaloacasas
authored andcommitted
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>
1 parent 3cdd04b commit ac200a6

File tree

1 file changed

+1
-1
lines changed
  • test/addons/make-callback-recurse

1 file changed

+1
-1
lines changed

Diff for: test/addons/make-callback-recurse/test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ assert.throws(function() {
1515
makeCallback({}, function() {
1616
throw new Error('hi from domain error');
1717
});
18-
});
18+
}, /^Error: hi from domain error$/);
1919

2020

2121
// Check the execution order of the nextTickQueue and MicrotaskQueue in

0 commit comments

Comments
 (0)