Skip to content

Commit

Permalink
test: properly re-add Mocha's uncaught listeners
Browse files Browse the repository at this point in the history
  • Loading branch information
TooTallNate committed May 19, 2014
1 parent 1998583 commit 0511cdc
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion test/callback.js
Expand Up @@ -181,7 +181,12 @@ describe('Callback', function () {
process.removeAllListeners('uncaughtException')
process.once('uncaughtException', function (e) {
assert(/ffi/.test(e.message))
listeners.forEach(process.emit.bind(process, 'uncaughtException'))

// re-add Mocha's listeners
listeners.forEach(function (fn) {
process.on('uncaughtException', fn)
})

done()
})

Expand Down

0 comments on commit 0511cdc

Please sign in to comment.