diff --git a/tests/boundary/mcp/bundleComparisonMcp.test.ts b/tests/boundary/mcp/bundleComparisonMcp.test.ts index b80c9ccd9c..9020ff9320 100644 --- a/tests/boundary/mcp/bundleComparisonMcp.test.ts +++ b/tests/boundary/mcp/bundleComparisonMcp.test.ts @@ -155,22 +155,22 @@ it("requires absolute bundle paths without changing server-cwd semantics", async }, }); const relativeCases = [ - ["left.json", "right.json", "left_bundle_path"], - ["left.json", join(root, "right.json"), "left_bundle_path"], - [join(root, "left.json"), "right.json", "right_bundle_path"], + ["left.json", "right.json", ["left_bundle_path", "right_bundle_path"]], + ["left.json", join(root, "right.json"), ["left_bundle_path"]], + [join(root, "left.json"), "right.json", ["right_bundle_path"]], ] as const; - for (const [leftPath, rightPath, rejectedField] of relativeCases) { + for (const [leftPath, rightPath, rejectedFields] of relativeCases) { const result = await compare(leftPath, rightPath); - expect(parseMcpToolError(result).error).toMatchObject({ + const { error } = parseMcpToolError(result); + expect(error).toMatchObject({ code: "invalid_request", category: "invalid_input", + details: { operation: "compare_bundles" }, }); - expect(result.content[0]).toMatchObject({ - text: expect.stringContaining( - `${rejectedField}: must be an absolute local filesystem path`, - ), - }); + const details = JSON.stringify(error.details); + for (const field of rejectedFields) expect(details).toContain(field); } + expect(connected.session.exportEvidenceBundle().records).toEqual([]); expect( bundleComparisonInputSchema.parse({ left_bundle_path: "left.json",