(count = 2)
| 79 | // Resolves after requestAnimationFrame callbacks scheduled before this call, |
| 80 | // including callbacks they schedule (nested up to `count - 1` levels deep) |
| 81 | async 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 | |
| 89 | describe("hydration", () => { |
| 90 | let consoleError: ReturnType<typeof vi.spyOn>; |