feat(confidence-engine): expose initial reconstruction evidence
This commit is contained in:
@@ -33,9 +33,33 @@ describe("app/api/cases/start route", () => {
|
||||
});
|
||||
|
||||
it("returns 200 on success", async () => {
|
||||
const reconstruction = {
|
||||
summary: "Validated reconstruction summary",
|
||||
relationships: [
|
||||
{
|
||||
id: "r1",
|
||||
fromId: "u-intervention",
|
||||
toId: "u-problem",
|
||||
relationship: "depends_on",
|
||||
description: "The intervention depends on the unresolved problem.",
|
||||
confidence: "high",
|
||||
},
|
||||
],
|
||||
};
|
||||
mockStartCase.mockResolvedValue({
|
||||
success: true,
|
||||
situationGraph: { nodes: [{ id: "n1" }], edges: [] },
|
||||
reconstruction,
|
||||
situationGraph: {
|
||||
nodes: [{ id: "n1" }],
|
||||
edges: [
|
||||
{
|
||||
id: "e-unrelated",
|
||||
fromNodeId: "n1",
|
||||
toNodeId: "n1",
|
||||
relationship: "supports",
|
||||
},
|
||||
],
|
||||
},
|
||||
selectedQuestion: null,
|
||||
diagnostics: {},
|
||||
});
|
||||
@@ -50,6 +74,10 @@ describe("app/api/cases/start route", () => {
|
||||
);
|
||||
|
||||
expect(response.status).toBe(200);
|
||||
await expect(response.json()).resolves.toMatchObject({
|
||||
success: true,
|
||||
reconstruction,
|
||||
});
|
||||
});
|
||||
|
||||
it("returns 400 for invalid request input", async () => {
|
||||
|
||||
Reference in New Issue
Block a user