Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions src/memory/__tests__/persistence.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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", {}],
Expand All @@ -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" }),
Expand Down
Loading