mirror of
https://github.com/facebook/react.git
synced 2026-02-25 23:34:59 +00:00
* Add a failing test for recursion check * Make requestIdleCallback() and requestAnimationFrame() shims async They no longer need to be sync in tests because we already made DOM renderer sync by default. This fixes a crash when testing incrementalness in DOM renderer itself. * Style fix * Fix lint
14 lines
287 B
JavaScript
14 lines
287 B
JavaScript
/* eslint-disable */
|
|
global.__DEV__ = true;
|
|
|
|
// For testing DOM Fiber.
|
|
global.requestAnimationFrame = function(callback) {
|
|
setTimeout(callback);
|
|
};
|
|
|
|
global.requestIdleCallback = function(callback) {
|
|
setTimeout(() => {
|
|
callback({ timeRemaining() { return Infinity; } });
|
|
});
|
|
};
|