mightyscape-1.2/extensions/fablabchemnitz/animate_order/vivus-0.4.6/test/unit.setup.js
2022-11-04 22:26:10 +01:00

15 lines
392 B
JavaScript

/* Here is a cheap and bad implementation
* of requestAnimationFrame and
* cancelAnimationFrame mock.
* But it's more than enough
* for our tests.
*/
window.requestAnimFrameStack = [];
window.requestAnimationFrame = function (callback) {
window.requestAnimFrameStack.push(callback);
return true;
};
window.cancelAnimationFrame = function () {
window.requestAnimFrameStack = [];
};