test: tighten memory dreaming markdown assertion · openclaw/openclaw@3fe1c15
shakkernerd
·
2026-05-11
·
via Recent Commits to openclaw:main
File tree
extensions/memory-core/src
| Original file line number | Diff line number | Diff line change |
|---|
@@ -7,7 +7,12 @@ import { createMemoryCoreTestHarness } from "./test-helpers.js";
|
7 | 7 | const { createTempWorkspace } = createMemoryCoreTestHarness(); |
8 | 8 | |
9 | 9 | async function expectPathMissing(targetPath: string): Promise<void> { |
10 | | -await expect(fs.access(targetPath)).rejects.toMatchObject({ code: "ENOENT" }); |
| 10 | +const error = await fs.access(targetPath).then( |
| 11 | +() => undefined, |
| 12 | +(accessError: unknown) => accessError, |
| 13 | +); |
| 14 | +expect(error).toBeInstanceOf(Error); |
| 15 | +expect((error as NodeJS.ErrnoException).code).toBe("ENOENT"); |
11 | 16 | } |
12 | 17 | |
13 | 18 | function requireInlinePath(result: { inlinePath?: string }): string { |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。