From 49cef49ff9733907c67d4ddcc51e2f98c9975ac8 Mon Sep 17 00:00:00 2001 From: Shakker Date: Tue, 12 May 2026 05:04:17 +0100 Subject: [PATCH] test: count model switch side effects --- src/agents/agent-command.live-model-switch.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/agents/agent-command.live-model-switch.test.ts b/src/agents/agent-command.live-model-switch.test.ts index dc93f204b3d..f736fd48de0 100644 --- a/src/agents/agent-command.live-model-switch.test.ts +++ b/src/agents/agent-command.live-model-switch.test.ts @@ -873,7 +873,7 @@ describe("agentCommand – LiveSessionModelSwitchError retry", () => { thinking: "xhigh", }); - expect(state.loadManifestModelCatalogMock).toHaveBeenCalled(); + expect(state.loadManifestModelCatalogMock).toHaveBeenCalledTimes(1); const thinkingArgs = requireRecord( mockCallArg(state.isThinkingLevelSupportedMock), "thinking args", @@ -921,7 +921,7 @@ describe("agentCommand – LiveSessionModelSwitchError retry", () => { fallbackStepChainPosition: 1, fallbackStepFinalOutcome: "next_fallback", }); - expect(state.trajectoryFlushMock).toHaveBeenCalled(); + expect(state.trajectoryFlushMock).toHaveBeenCalledTimes(1); }); it("suppresses duplicate user persistence only after the current turn has flushed", async () => {