diff --git a/jest.setup.js b/jest.setup.js index f5ff7088c..a280f2150 100644 --- a/jest.setup.js +++ b/jest.setup.js @@ -13,3 +13,9 @@ Object.defineProperty(window, 'matchMedia', { dispatchEvent: jest.fn(), })), }); + +window.requestAnimationFrame = function (callback) { + setTimeout(callback); +}; + +window.cancelAnimationFrame = window.clearTimeout;