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
dave-k 2017-03-30 11:41:38 -07:00 committed by Vse Mozhet Byt
parent a94a5da78c
commit 943d085307
1 changed files with 1 additions and 1 deletions

View File

@ -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