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
When you use a polyfill for Date.now, like MooTools or ES5-shim does, the fake timer does not work in (native) IE8.
Probably it's because Sinon.JS feature checks if Date.now is available, but the polyfill is loaded after Sinon.JS is loaded.
I guess the right thing to do is to check for the existence of Date.now when useFakeTimers is called, as you suggested. In the meantime, you can get around this by loading Sinon after you have loaded the external library that defines Date.now.
When you use a polyfill for Date.now, like MooTools or ES5-shim does, the fake timer does not work in (native) IE8.
Probably it's because Sinon.JS feature checks if Date.now is available, but the polyfill is loaded after Sinon.JS is loaded.
Example: http://jsfiddle.net/arian/dhEbb/2/
Don't know if an exception can be made so when
useFakeTimer
is used, it will check ifDate.now
exists, or perhaps implementing Date.now anyway (so removing this check: https://github.com/cjohansen/Sinon.JS/blob/master/lib/sinon/util/fake_timers.js#L222), which works for me too.The text was updated successfully, but these errors were encountered: