mirror of https://github.com/nodejs/node.git
test: add a second argument to assert.throws()
- a regular expression that matches the entire error message. PR-URL: https://github.com/nodejs/node/pull/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>pull/12142/merge
parent
a94a5da78c
commit
943d085307
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue