mirror of
https://github.com/morluto/rea.git
synced 2026-11-14 18:52:48 +00:00
test(snapshot): assert full validation diagnostics
Refs #7442 Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
This commit is contained in:
1 parent
213fcc8ce1
commit
4d544c8434
2 files changed
+8
No files matched your search
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user