From e6bcda9d45b1d5d34124c03e244f5793fe304712 Mon Sep 17 00:00:00 2001 From: gensokyo-dev Date: Sat, 14 Nov 2026 08:22:14 +0000 Subject: [PATCH] test(snapshot): compare snapshot diagnostics without MCP session facts MCP errors now also carry open-session facts (selection and target at failure), so the CLI/MCP comparison checks that MCP keeps the CLI's snapshot details rather than requiring identical objects. Refs #7442 Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com> --- tests/acceptance/analysisSnapshotDiagnostics.test.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/acceptance/analysisSnapshotDiagnostics.test.ts b/tests/acceptance/analysisSnapshotDiagnostics.test.ts index 9a4b7d3db4..05ba051c7b 100644 --- a/tests/acceptance/analysisSnapshotDiagnostics.test.ts +++ b/tests/acceptance/analysisSnapshotDiagnostics.test.ts @@ -64,7 +64,8 @@ cliTest( "Analysis snapshot validation failed at target: Invalid input: expected object, received undefined (2 more issues)", ); } - expect(mcpError.details).toEqual(cliError.details); + // MCP adds open-session facts; the snapshot reason must match exactly. + expect(mcpError.details).toMatchObject(cliError.details); expect(await readFile(snapshot, "utf8")).toBe(encoded); } expect(