Mocha 7: A global uncaughtException
handle is leaked for every completed test runner
#4144
Labels
type: bug
a defect, confirmed by a maintainer
Description
A global
uncaughtException
handle is leaked for every completed test runner, in turn causing aMaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 uncaughtException listeners added to [process]. Use emitter.setMaxListeners() to increase limit
warning to be thrown bynode
.Since every handler attached is identical in content here, attaching one for the first completed runner should be just as correct (although, functionality-wise, it may need to be detcahced once a new runner has started - it's unclear how the sequencing between multiple runners is intended to work out for this handler).
Steps to Reproduce
Expected behavior:
No warnings from node.
Actual behavior:
A
MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 uncaughtException listeners added to [process]. Use emitter.setMaxListeners() to increase limit
warning is printed.Reproduces how often:
Every time. You can paste that example code into a repl.
The text was updated successfully, but these errors were encountered: