MCPcopy
hub / github.com/Shopify/draggable / waitForRequestAnimationFrame

Function waitForRequestAnimationFrame

test/helpers/environment.ts:23–27  ·  view source on GitHub ↗
(
  requestAnimationFrameTimeout = REQUEST_ANIMATION_FRAME_TIMEOUT,
)

Source from the content-addressed store, hash-verified

21export const REQUEST_ANIMATION_FRAME_TIMEOUT = 15;
22
23export function waitForRequestAnimationFrame(
24 requestAnimationFrameTimeout = REQUEST_ANIMATION_FRAME_TIMEOUT,
25) {
26 jest.advanceTimersByTime(requestAnimationFrameTimeout + 1);
27}
28
29export function waitForPromisesToResolve() {
30 return new Promise((resolve) => setImmediate(resolve));

Callers 5

Draggable.test.jsFile · 0.90
Focusable.test.jsFile · 0.90
Mirror.test.jsFile · 0.90

Calls

no outgoing calls

Tested by 1

Used in the wild real call sites across dependent graphs

searching dependent graphs…