test: add common.crashOnUnhandledRejection()

PR-URL: https://github.com/nodejs/node/pull/17247
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
This commit is contained in:
IHsuan 2017-11-22 16:39:05 +08:00 committed by Myles Borins
parent b1acba363d
commit 694e7baf00
No known key found for this signature in database
GPG Key ID: 933B01F40B5CA946

View File

@ -9,6 +9,7 @@ const makeCallback = binding.makeCallback;
// Make sure this is run in the future. // Make sure this is run in the future.
const mustCallCheckDomains = common.mustCall(checkDomains); const mustCallCheckDomains = common.mustCall(checkDomains);
common.crashOnUnhandledRejection();
// Make sure that using MakeCallback allows the error to propagate. // Make sure that using MakeCallback allows the error to propagate.
assert.throws(function() { assert.throws(function() {