fix: update new mcp tests

This commit is contained in:
Daniel Riccio 2025-06-13 15:56:30 -05:00
parent e1acb7cd6c
commit 28315f4fc9

View file

@ -271,6 +271,19 @@ describe("McpHub", () => {
},
}
// Set up mock connection
const mockConnection: McpConnection = {
server: {
name: "test-server",
config: "test-server-config",
status: "connected",
source: "global",
},
client: {} as any,
transport: {} as any,
}
mcpHub.connections = [mockConnection]
// Mock reading initial config
;(fs.readFile as jest.Mock).mockResolvedValueOnce(JSON.stringify(mockConfig))
@ -305,6 +318,19 @@ describe("McpHub", () => {
},
}
// Set up mock connection
const mockConnection: McpConnection = {
server: {
name: "test-server",
config: "test-server-config",
status: "connected",
source: "global",
},
client: {} as any,
transport: {} as any,
}
mcpHub.connections = [mockConnection]
// Mock reading initial config
;(fs.readFile as jest.Mock).mockResolvedValueOnce(JSON.stringify(mockConfig))
@ -338,6 +364,19 @@ describe("McpHub", () => {
},
}
// Set up mock connection
const mockConnection: McpConnection = {
server: {
name: "test-server",
config: "test-server-config",
status: "connected",
source: "global",
},
client: {} as any,
transport: {} as any,
}
mcpHub.connections = [mockConnection]
// Mock reading initial config
;(fs.readFile as jest.Mock).mockResolvedValueOnce(JSON.stringify(mockConfig))