From cf47ecf97b23191a6fc7c23a445736c2c2fca645 Mon Sep 17 00:00:00 2001 From: Haze <709547807@qq.com> Date: Mon, 13 Apr 2026 18:27:51 +0800 Subject: [PATCH] Update chat history tests to reflect increased IPC call expectations and adjust timeout duration in retry logic for improved accuracy. --- tests/unit/chat-history-actions.test.ts | 2 +- tests/unit/chat-store-history-retry.test.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/unit/chat-history-actions.test.ts b/tests/unit/chat-history-actions.test.ts index 00c9f62..31aa46c 100644 --- a/tests/unit/chat-history-actions.test.ts +++ b/tests/unit/chat-history-actions.test.ts @@ -272,7 +272,7 @@ describe('chat history actions', () => { await vi.runAllTimersAsync(); await loadPromise; - expect(invokeIpcMock).toHaveBeenCalledTimes(2); + expect(invokeIpcMock).toHaveBeenCalledTimes(5); expect(h.read().messages).toEqual([]); expect(h.read().error).toBe('RPC timeout: chat.history'); expect(warnSpy).toHaveBeenCalledWith( diff --git a/tests/unit/chat-store-history-retry.test.ts b/tests/unit/chat-store-history-retry.test.ts index ada811f..31eac64 100644 --- a/tests/unit/chat-store-history-retry.test.ts +++ b/tests/unit/chat-store-history-retry.test.ts @@ -90,7 +90,7 @@ describe('useChatStore startup history retry', () => { { sessionKey: 'agent:main:main', limit: 200 }, undefined, ); - expect(setTimeoutSpy).toHaveBeenCalledWith(expect.any(Function), 72_600); + expect(setTimeoutSpy).toHaveBeenCalledWith(expect.any(Function), 191_800); setTimeoutSpy.mockRestore(); });