From 59a25cc39ed25af348006420e0a9d9aabc71bc92 Mon Sep 17 00:00:00 2001 From: Chris Scott <99081550+chriswritescode-dev@users.noreply.github.com> Date: Sun, 11 Oct 2026 23:47:09 -0400 Subject: [PATCH] test(sessions): flush microtasks instead of fixed sleep in transcript test --- frontend/src/hooks/useSessionTranscript.test.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/hooks/useSessionTranscript.test.tsx b/frontend/src/hooks/useSessionTranscript.test.tsx index 3a1a21c4..344c9918 100644 --- a/frontend/src/hooks/useSessionTranscript.test.tsx +++ b/frontend/src/hooks/useSessionTranscript.test.tsx @@ -224,7 +224,7 @@ describe('useSessionTranscript', () => { await waitFor(() => expect(result.current.messages).toHaveLength(2)) - await new Promise((resolve) => setTimeout(resolve, 20)) + await act(async () => {}) expect(mocks.readSessionSnapshot).toHaveBeenCalledTimes(1) })