Align persistence test with fatal validation behavior

This commit is contained in:
Lum1104
2026-03-28 15:53:31 +08:00
Unverified
parent e7ad9d6d69
commit 334ac871df
@@ -93,8 +93,8 @@ describe("persistence", () => {
expect(loaded).toBeNull();
});
it("should throw error when loading invalid graph", () => {
const invalidGraph = { ...sampleGraph, version: 123 }; // Invalid version type
it("should throw error when loading a fatally invalid graph", () => {
const invalidGraph = { ...sampleGraph, nodes: "not-an-array" };
saveGraph(tempDir, invalidGraph as unknown as KnowledgeGraph);
expect(() => {