From 3fe1c1504da03b3f7b99fd04c1d90c8fdd784c8e Mon Sep 17 00:00:00 2001 From: Shakker Date: Mon, 11 May 2026 10:25:54 +0100 Subject: [PATCH] test: tighten memory dreaming markdown assertion --- extensions/memory-core/src/dreaming-markdown.test.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/extensions/memory-core/src/dreaming-markdown.test.ts b/extensions/memory-core/src/dreaming-markdown.test.ts index 5df6d9dc4d7..65643f3977d 100644 --- a/extensions/memory-core/src/dreaming-markdown.test.ts +++ b/extensions/memory-core/src/dreaming-markdown.test.ts @@ -7,7 +7,12 @@ import { createMemoryCoreTestHarness } from "./test-helpers.js"; const { createTempWorkspace } = createMemoryCoreTestHarness(); async function expectPathMissing(targetPath: string): Promise { - await expect(fs.access(targetPath)).rejects.toMatchObject({ code: "ENOENT" }); + const error = await fs.access(targetPath).then( + () => undefined, + (accessError: unknown) => accessError, + ); + expect(error).toBeInstanceOf(Error); + expect((error as NodeJS.ErrnoException).code).toBe("ENOENT"); } function requireInlinePath(result: { inlinePath?: string }): string {