Earlier quoted context omitted.
...this makes no sense at all.
Why would you be down voting this? Parent's statement is completely nonsensical. If you wanted to test a function irrespective of window.setInterval's implementation you would just PASS window.setInterval as a parameter to that function. You would NOT add a wrapper function for window.setInterval because it is completely useless.
I don’t think it’s ‘nonsensical’ though to suggest that it’s a fairly common practice in testing to not want your unit tests to actually set up recurring callbacks.
Isolating an external side effect to make it testable, as well as to align its abstraction with the one that your framework uses is a common pattern anyway.
I’m not sure why this angers you so much?