mock-spawn icon indicating copy to clipboard operation
mock-spawn copied to clipboard

memory leak when using this with gulp mocha, mockery, chai, and sinon

Open kvernon opened this issue 8 years ago • 1 comments

We're trying to use this where I work, and are finding that this runs into a memory leak:

(node:3597) Warning: Possible EventEmitter memory leak detected. 11 exit listeners added. Use emitter.setMaxListeners() to increase limit

When looking at your code, you continually add eventlisteners, but never remove them. If you need an example please let me know.

I will note that everything seems to run fine within wallaby js. It's just that we need gulp mocha because our build process depends on verifying various tests.

Best, Kelly

kvernon avatar Nov 28 '16 16:11 kvernon

Thanks for the bug report, a minimal code example would be great! If you have a pull request that would be even better! If not, I can probably take a look and make changes some time this week.

What version of node are you running?

gcochard avatar Nov 28 '16 16:11 gcochard