Update chat history tests to reflect increased IPC call expectations and adjust timeout duration in retry logic for improved accuracy.
This commit is contained in:
@@ -272,7 +272,7 @@ describe('chat history actions', () => {
|
|||||||
await vi.runAllTimersAsync();
|
await vi.runAllTimersAsync();
|
||||||
await loadPromise;
|
await loadPromise;
|
||||||
|
|
||||||
expect(invokeIpcMock).toHaveBeenCalledTimes(2);
|
expect(invokeIpcMock).toHaveBeenCalledTimes(5);
|
||||||
expect(h.read().messages).toEqual([]);
|
expect(h.read().messages).toEqual([]);
|
||||||
expect(h.read().error).toBe('RPC timeout: chat.history');
|
expect(h.read().error).toBe('RPC timeout: chat.history');
|
||||||
expect(warnSpy).toHaveBeenCalledWith(
|
expect(warnSpy).toHaveBeenCalledWith(
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ describe('useChatStore startup history retry', () => {
|
|||||||
{ sessionKey: 'agent:main:main', limit: 200 },
|
{ sessionKey: 'agent:main:main', limit: 200 },
|
||||||
undefined,
|
undefined,
|
||||||
);
|
);
|
||||||
expect(setTimeoutSpy).toHaveBeenCalledWith(expect.any(Function), 72_600);
|
expect(setTimeoutSpy).toHaveBeenCalledWith(expect.any(Function), 191_800);
|
||||||
setTimeoutSpy.mockRestore();
|
setTimeoutSpy.mockRestore();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user