Skip to content
This repository has been archived by the owner on Jan 6, 2021. It is now read-only.

Commit

Permalink
test: Fix EventEmitter.MaxListenersExceededWarning warning (#132)
Browse files Browse the repository at this point in the history
When tests are run, node logs warnings - `MaxListenersExceededWarning: Possible EventEmitter memory
leak detected`. Fix warning by setting the max listeners to 20 on `process`(EventEmitter)
  • Loading branch information
sudo-suhas authored and Kent C. Dodds committed Aug 3, 2017
1 parent 0fe3482 commit 601632d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/index.test.js
Expand Up @@ -2,6 +2,8 @@ import crossSpawnMock from 'cross-spawn'

const crossEnv = require('.')

process.setMaxListeners(20)

beforeEach(() => {
crossSpawnMock.__mock.reset()
})
Expand Down

0 comments on commit 601632d

Please sign in to comment.