diff --git a/packages/react-essentials/hooks/useUpdateLoop.test.ts b/packages/react-essentials/hooks/useUpdateLoop.test.ts index f2623f90..8ffd973e 100644 --- a/packages/react-essentials/hooks/useUpdateLoop.test.ts +++ b/packages/react-essentials/hooks/useUpdateLoop.test.ts @@ -81,6 +81,17 @@ describe("useUpdateLoop", () => { fps: 50, }), ); + + vi.advanceTimersByTime(2000); + + expect(onUpdate).toHaveBeenLastCalledWith( + expect.objectContaining({ + index: 149, + time: 3000, + deltaTime: 20, + fps: 50, + }), + ); }); it("should not call the onUpdate callback when the loop is paused", () => {