This repository has been archived on 2023-03-25. You can view files and clone it, but cannot push or open issues or pull requests.
mightyscape-1.1-deprecated/extensions/fablabchemnitz/animate_order/vivus-0.4.6/test/unit.setup.js
2021-07-23 02:36:56 +02: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 = [];
};