From d7388c6408754374b034d6a104094159c145b69d Mon Sep 17 00:00:00 2001 From: cliffhall Date: Fri, 9 Oct 2026 23:46:29 -0400 Subject: [PATCH] test(memory): expect Node 26's path-suffixed EISDIR message Node 26 appends the file path to the EISDIR read error, so the exact-match assertion in persistence.test.ts failed there. Expect the suffixed text on Node 26 and later and the bare text before, keeping the exact match. Co-Authored-By: Claude Opus 5.5 Signed-off-by: cliffhall --- src/memory/__tests__/persistence.test.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/memory/__tests__/persistence.test.ts b/src/memory/__tests__/persistence.test.ts index 24ac8c2a57..9f867bed5b 100644 --- a/src/memory/__tests__/persistence.test.ts +++ b/src/memory/__tests__/persistence.test.ts @@ -211,6 +211,11 @@ describe("memory persistence over the protocol", () => { // which is not the ENOENT that means "no graph yet". await fs.mkdir(filePath); const { client } = await open(); + // Node 26 appends the path to the message; earlier versions do not + // (#5076). The server passes Node's message through either way. + const bare = "EISDIR: illegal operation on a directory, read"; + const nodeMajor = Number(process.versions.node.split(".")[0]); + const expected = nodeMajor >= 26 ? `${bare} '${filePath}'` : bare; for (const [name, args] of [ ["read_graph", {}], @@ -220,9 +225,7 @@ describe("memory persistence over the protocol", () => { ] as const) { const result = await call(client, name, args); expect(result.isError).toBe(true); - expect(textOf(result)).toBe( - "EISDIR: illegal operation on a directory, read", - ); + expect(textOf(result)).toBe(expected); } await expect( client.readResource({ uri: "memory://knowledge-graph" }),