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 <[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]>
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

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)