chore(confidence-engine): upgrade to zod 4
This commit is contained in:
@@ -36,7 +36,8 @@ describe("reconstruction schema", () => {
|
||||
const result = reconstructionSchema.safeParse(input);
|
||||
expect(result.success).toBe(false);
|
||||
if (!result.success) {
|
||||
expect(result.error.issues[0].message).toContain("Expected");
|
||||
expect(result.error.issues.length).toBeGreaterThan(0);
|
||||
expect(result.error.issues[0].path).toContain("confidence");
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -254,10 +254,10 @@ describe("analyseScenario compatibility", () => {
|
||||
expect(result.validationIssues).toContainEqual(expect.objectContaining({
|
||||
path: ["reconstruction", "observedStates", 0, "description"],
|
||||
code: "invalid_type",
|
||||
message: "Required",
|
||||
expected: "string",
|
||||
}));
|
||||
expect(result.providerApiPath).toBe("/api/chat");
|
||||
expect(result.errors).toContain("reconstruction: Required");
|
||||
expect(result.errors).toContainEqual(expect.stringMatching(/^reconstruction:/));
|
||||
});
|
||||
|
||||
it("succeeds when reported_claim is the only evidenceType mismatch", async () => {
|
||||
|
||||
Reference in New Issue
Block a user