We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
common.crashOnUnhandledRejection
1 parent f6e58c3 commit 4eb28c8Copy full SHA for 4eb28c8
test/common.js
@@ -552,3 +552,9 @@ exports.expectWarning = function(name, expected) {
552
expected.splice(expected.indexOf(warning.message), 1);
553
}, expected.length));
554
};
555
+
556
+// Crash the process on unhandled rejections.
557
+exports.crashOnUnhandledRejection = function() {
558
+ process.on('unhandledRejection',
559
+ (err) => process.nextTick(() => { throw err; }));
560
+};
0 commit comments