From 9bff278efe478127a4c1e784fa2bc2faf95c3871 Mon Sep 17 00:00:00 2001 From: Tin Date: Fri, 10 Jul 2026 10:05:46 -0700 Subject: [PATCH] test(mcp): extract inline server fixtures so the eslint inline-object budget stays at baseline --- ui/litellm-dashboard/eslint-metrics.json | 2 +- .../components/mcp_tools/create_mcp_server.test.tsx | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/ui/litellm-dashboard/eslint-metrics.json b/ui/litellm-dashboard/eslint-metrics.json index 9431c278387..2e204c63a48 100644 --- a/ui/litellm-dashboard/eslint-metrics.json +++ b/ui/litellm-dashboard/eslint-metrics.json @@ -1,7 +1,7 @@ { "@typescript-eslint/no-explicit-any": 1978, "complexity": 129, - "local/no-large-inline-object-arg": 514, + "local/no-large-inline-object-arg": 512, "local/no-long-condition-chain": 233, "max-depth": 59, "no-console": 15 diff --git a/ui/litellm-dashboard/src/components/mcp_tools/create_mcp_server.test.tsx b/ui/litellm-dashboard/src/components/mcp_tools/create_mcp_server.test.tsx index cfd0ec1dfb4..a4668bddfc3 100644 --- a/ui/litellm-dashboard/src/components/mcp_tools/create_mcp_server.test.tsx +++ b/ui/litellm-dashboard/src/components/mcp_tools/create_mcp_server.test.tsx @@ -532,7 +532,7 @@ describe("CreateMCPServer", () => { }); }); - vi.mocked(networking.createMCPServer).mockResolvedValue({ + const keptAppServer = { server_id: "kept-app-server", server_name: "CF_Keep_Server", alias: "CF_Keep_Server", @@ -543,7 +543,8 @@ describe("CreateMCPServer", () => { created_by: "user-1", updated_at: "2024-01-01T00:00:00Z", updated_by: "user-1", - }); + }; + vi.mocked(networking.createMCPServer).mockResolvedValue(keptAppServer); await act(async () => { fireEvent.click(screen.getByRole("button", { name: "Add MCP Server" })); @@ -583,7 +584,7 @@ describe("CreateMCPServer", () => { // into a mode that now persists credentials onto the server row. await selectAntOption("Authentication", "True Passthrough (no LiteLLM auth)"); - vi.mocked(networking.createMCPServer).mockResolvedValue({ + const switchedServer = { server_id: "switched-server", server_name: "Switch_Server", alias: "Switch_Server", @@ -594,7 +595,8 @@ describe("CreateMCPServer", () => { created_by: "user-1", updated_at: "2024-01-01T00:00:00Z", updated_by: "user-1", - }); + }; + vi.mocked(networking.createMCPServer).mockResolvedValue(switchedServer); await act(async () => { fireEvent.click(screen.getByRole("button", { name: "Add MCP Server" }));