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 {