Skip to content

Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure

TypeScript

test(desktop-ui): r5-m4 verify local-page readiness behavior

Josuéce77604c0aca
diff --git a/desktop-app/ui/src/hooks/domain/__tests__/localPageReadiness.characterization.test.tsx b/desktop-app/ui/src/hooks/domain/__tests__/localPageReadiness.characterization.test.tsx
index 9e7fd7b89..ffdb92367 100644
--- a/desktop-app/ui/src/hooks/domain/__tests__/localPageReadiness.characterization.test.tsx
+++ b/desktop-app/ui/src/hooks/domain/__tests__/localPageReadiness.characterization.test.tsx
@@ -36,7 +36,8 @@ describe('same-chat local page readiness', () => {
)
const originalSetLastActive = clerum.chat.setLastActive.getMockImplementation()
- if (!originalSetLastActive) throw new Error('Expected the ChatStore setLastActive producer')
+ if (!originalSetLastActive)
+ throw new Error('Expected the setLastActive test mock implementation')
const secondCallEntered = deferred<void>()
const releaseSecondCall = deferred<void>()
let setLastActiveCalls = 0
@@ -80,8 +81,9 @@ describe('same-chat local page readiness', () => {
expect(controller.result.current.chatMessages).toEqual([
expect.objectContaining({ id: 'local-turn-5', content: 'visible cached question' }),
])
+ expect(controller.result.current.hasOlderMessages).toBe(true)
expect(clerum.chat.loadMessages).toHaveBeenCalledTimes(2)
- expect(clerum.rpc.loadSessionMessages).toHaveBeenCalledWith(
+ expect(clerum.rpc.loadSessionMessages).toHaveBeenLastCalledWith(
'agent-x',
'agent-x',
chatId,