Protect setTimeout
from being overridden by sinon.useFakeTimers()
and the like
#1
Labels
Milestone
setTimeout
from being overridden by sinon.useFakeTimers()
and the like
#1
Testing libraries that help developers mock timers will globally replace
setTimeout
andsetImmediate
. We only use these for getting an new call stack, so per taylorhakes/promise-polyfill#15, it is justified to keep these from getting replaced.The change should be a simple addition of
var setTimeout = setTimeout
, plus a comment to explain why we are doing it. Our usage ofsetImmediate
happens to already be protected, but a comment that covers that should be used as well.The text was updated successfully, but these errors were encountered: