diff --git a/tests/acceptance/analysisSnapshotDiagnostics.test.ts b/tests/acceptance/analysisSnapshotDiagnostics.test.ts index 1c24529239..b81bc38ca7 100644 --- a/tests/acceptance/analysisSnapshotDiagnostics.test.ts +++ b/tests/acceptance/analysisSnapshotDiagnostics.test.ts @@ -59,6 +59,10 @@ cliTest( }); expect(error).not.toHaveProperty("cause"); expect(error).not.toHaveProperty("stack"); + if (field === "target") + expect(error.details?.reason).toBe( + "Analysis snapshot validation failed at target: Invalid input: expected object, received undefined (2 more issues)", + ); } expect(mcpError.details).toEqual(cliError.details); expect(await readFile(snapshot, "utf8")).toBe(encoded); diff --git a/tests/boundary/filesystem/analysisSnapshotInput.test.ts b/tests/boundary/filesystem/analysisSnapshotInput.test.ts index 0b5ca523f5..6f67fbf01d 100644 --- a/tests/boundary/filesystem/analysisSnapshotInput.test.ts +++ b/tests/boundary/filesystem/analysisSnapshotInput.test.ts @@ -59,6 +59,10 @@ describe.each([ retryable: false, details: { reason: expect.stringContaining(`at ${field}:`) }, }); + if (field === "target") + expect(projected.details?.reason).toBe( + "Analysis snapshot validation failed at target: Invalid input: expected object, received undefined (2 more issues)", + ); expect(projected).not.toHaveProperty("cause"); expect(projected).not.toHaveProperty("stack"); expect(await readFile(path, "utf8")).toBe(encoded);