diff --git a/jest/setup.js b/jest/setup.js index 3112707451595c..71f49e6892f230 100644 --- a/jest/setup.js +++ b/jest/setup.js @@ -25,7 +25,7 @@ global.regeneratorRuntime = jest.requireActual('regenerator-runtime/runtime'); global.window = global; global.requestAnimationFrame = function (callback) { - return setTimeout(callback, 0); + return setTimeout(() => callback(jest.now()), 0); }; global.cancelAnimationFrame = function (id) { clearTimeout(id);