File tree Expand file tree Collapse file tree 1 file changed +2
-7
lines changed
Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -257,23 +257,18 @@ function enableEachHooks(context) {
257257
258258/**
259259 * Removes mocha's uncaughtException handler, allowing exceptions to be handled
260- * by domains during parallel spec execution.
260+ * by domains during parallel spec execution, and all others to terminate the
261+ * process.
261262 *
262263 * @returns {function } Function that restores mocha's uncaughtException listener
263264 */
264265function patchUncaught ( ) {
265266 var name = 'uncaughtException' ;
266267 var originalListener = process . listeners ( name ) . pop ( ) ;
267268
268- var listener = function ( err ) {
269- // noop
270- } ;
271-
272269 process . removeListener ( name , originalListener ) ;
273- process . on ( name , listener ) ;
274270
275271 return function ( ) {
276- process . removeListener ( name , listener ) ;
277272 process . on ( name , originalListener ) ;
278273 } ;
279274}
You can’t perform that action at this time.
0 commit comments