MCPcopy Create free account
hub / github.com/bvaughn/react-window / waitForAnimationFrames

Function waitForAnimationFrames

lib/hydration.test.tsx:81–87  ·  view source on GitHub ↗
(count = 2)

Source from the content-addressed store, hash-verified

79// Resolves after requestAnimationFrame callbacks scheduled before this call,
80// including callbacks they schedule (nested up to `count - 1` levels deep)
81async function waitForAnimationFrames(count = 2) {
82 await act(async () => {
83 for (let i = 0; i < count; i++) {
84 await new Promise(requestAnimationFrame);
85 }
86 });
87}
88
89describe("hydration", () => {
90 let consoleError: ReturnType<typeof vi.spyOn>;

Callers 1

hydration.test.tsxFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected