Last Updated: February 25, 2016
·
762
· Alex Navasardyan

override setTimeout for testing in IE

before any reference to setTimeout, do this:

window.setTimeout = window.setTimeout;

That's going to take setTimeout function from window.prototype and put it on window object.

After that, you can override setTimeout for testing.