Update packages/dashboard/app/hooks/__tests__/useChat.test.ts
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
This commit is contained in:
@@ -2173,8 +2173,10 @@ describe("useChat", () => {
|
||||
result.current.selectSession("session-001");
|
||||
});
|
||||
|
||||
await act(async () => {
|
||||
await new Promise((resolve) => setTimeout(resolve, 25));
|
||||
await waitFor(() => {
|
||||
expect(result.current.pendingMessage).toBe("Queued follow-up");
|
||||
expect(mockStreamChatResponse).not.toHaveBeenCalled();
|
||||
expect(localStorage.getItem(getChatPendingMessageKey("session-001"))).toBe("Queued follow-up");
|
||||
});
|
||||
|
||||
expect(result.current.pendingMessage).toBe("Queued follow-up");
|
||||
|
||||
Reference in New Issue
Block a user