You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With the latest version of Sinon.JS (1.12.1) I see the following error when clock = sinon.useFakeTimers() is used within Mocha:
Error: global leaks detected: setImmediate, clearImmediate
even though I'm invoking clock.restore() within my afterEach() method. I raised this very same bug with Sinon.JS, but they said it was a Mocha issue, since:
They are restored, but the process of faking/restoring them copies them from window's prototype to window. This has been a known issue in the past: #143
Either apply the solution in #143 (comment) or ask the mocha team to add setImmediate and clearImmediate to the list of properties it should not detect as leaked globals.
They specifically pointed to this section of code within Mocha. Since this stuff should just work out of the box, I thought it was best to raise it here.
The text was updated successfully, but these errors were encountered:
With the latest version of Sinon.JS (1.12.1) I see the following error when
clock = sinon.useFakeTimers()
is used within Mocha:even though I'm invoking
clock.restore()
within myafterEach()
method. I raised this very same bug with Sinon.JS, but they said it was a Mocha issue, since:They specifically pointed to this section of code within Mocha. Since this stuff should just work out of the box, I thought it was best to raise it here.
The text was updated successfully, but these errors were encountered: