From 9555e96ec2e43b191f311bf7b5bdf49d6738a80b Mon Sep 17 00:00:00 2001 From: qqqys Date: Wed, 18 Mar 2026 17:43:39 +0800 Subject: [PATCH] test(mcp): update tests to include verification of reconnect command registration --- packages/cli/src/commands/mcp.test.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/cli/src/commands/mcp.test.ts b/packages/cli/src/commands/mcp.test.ts index b4e9980cb..7392421f3 100644 --- a/packages/cli/src/commands/mcp.test.ts +++ b/packages/cli/src/commands/mcp.test.ts @@ -37,7 +37,7 @@ describe('mcp command', () => { mcpCommand.builder(mockYargs as unknown as Argv); - expect(mockYargs.command).toHaveBeenCalledTimes(3); + expect(mockYargs.command).toHaveBeenCalledTimes(4); // Verify that the specific subcommands are registered const commandCalls = mockYargs.command.mock.calls; @@ -46,6 +46,7 @@ describe('mcp command', () => { expect(commandNames).toContain('add [args...]'); expect(commandNames).toContain('remove '); expect(commandNames).toContain('list'); + expect(commandNames).toContain('reconnect [server-name]'); expect(mockYargs.demandCommand).toHaveBeenCalledWith( 1,