From 8da295034062a0276130ce4f9f29db658dc44e53 Mon Sep 17 00:00:00 2001 From: gsxdsm Date: Sat, 27 Jun 2026 18:08:48 -0700 Subject: [PATCH] Update --- .../app/hooks/__tests__/useActivityLog.test.ts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/packages/dashboard/app/hooks/__tests__/useActivityLog.test.ts b/packages/dashboard/app/hooks/__tests__/useActivityLog.test.ts index b52d1f3d5e..5029ee5f51 100644 --- a/packages/dashboard/app/hooks/__tests__/useActivityLog.test.ts +++ b/packages/dashboard/app/hooks/__tests__/useActivityLog.test.ts @@ -123,9 +123,14 @@ describe("useActivityLog", () => { expect(mockFetchActivityLog).toHaveBeenCalledTimes(1); }); - // Advance time — should not trigger another fetch - vi.useRealTimers(); - await new Promise((r) => setTimeout(r, 100)); + // FNXC:ActivityLogTests 2026-06-27-17:10: + // Prove the negative (no auto-refresh poll fires when autoRefresh:false) with + // fake timers instead of a real wall-clock sleep. The hook polls every + // POLL_INTERVAL_MS (5000ms); advancing well past two intervals deterministically + // exercises the disabled-interval path with zero real wait (FN-5048: no slow tests). + await act(async () => { + await vi.advanceTimersByTimeAsync(12_000); + }); expect(mockFetchActivityLog).toHaveBeenCalledTimes(1); });