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>
This commit is contained in:
gensokyo-devandgensokyo-dev authored and Ysopwnable committed 2026-11-14 14:06:23 +01:00
1 parent 3ae21f9ff8
commit e6bcda9d45
1 file changed
+2 -1
@@ -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(