From 72583f0bf6bc13d990a43eb22f667ce0d0f3da0d Mon Sep 17 00:00:00 2001 From: Christopher Hiller Date: Tue, 26 May 2020 16:32:54 -0700 Subject: [PATCH] add process.listeners impl Signed-off-by: Christopher Hiller --- browser-entry.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/browser-entry.js b/browser-entry.js index 114d2f7213..2967dd9deb 100644 --- a/browser-entry.js +++ b/browser-entry.js @@ -77,6 +77,13 @@ process.on = function(e, fn) { } }; +process.listeners = function(e) { + if (e === 'uncaughtException') { + return uncaughtExceptionHandlers; + } + return []; +}; + // The BDD UI is registered by default, but no UI will be functional in the // browser without an explicit call to the overridden `mocha.ui` (see below). // Ensure that this default UI does not expose its methods to the global scope.