I am using stream-spec for a project with mocha, and mocha was complaining about a global leak (Error: global leak detected: paused). This turned out to be in the pauseSpec function, that did not include a var before the paused variable was declared.
Error: global leak detected: paused
fixed global var leak that mocha was complaining about
I've had this error before, what does mocha do to detect global leaks?