From b8ab418dd6b7246ee3512e6893eabe2ca65506f5 Mon Sep 17 00:00:00 2001 From: roboomp Date: Fri, 31 Jul 2026 16:59:38 +0000 Subject: [PATCH] test(coding-agent): update MCP reauth fake for reload deps reloadServers() now reads ctx.settings and session.setMCPPromptCommands, which the shared /mcp reauth|unauth harness did not provide, so those tests threw inside reload and failed their showError assertions. Add both members to the fake context. Fixes #7189 --- packages/coding-agent/test/mcp-command-reauth.test.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/coding-agent/test/mcp-command-reauth.test.ts b/packages/coding-agent/test/mcp-command-reauth.test.ts index 4036cc9d4..da63a69d3 100644 --- a/packages/coding-agent/test/mcp-command-reauth.test.ts +++ b/packages/coding-agent/test/mcp-command-reauth.test.ts @@ -69,8 +69,12 @@ function createController(authStorage: AuthStorage, mcpManagerOverrides: Record< pendingProviderId: undefined, tryClaimInput: vi.fn(), }, + settings: { + get: vi.fn((_key: string): unknown => undefined), + }, session: { refreshMCPTools: vi.fn(), + setMCPPromptCommands: vi.fn(), modelRegistry: { authStorage }, }, mcpManager,