test: tighten nodes camera assertion · openclaw/openclaw@ae14f3a
steipete
·
2026-05-09
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -35,7 +35,13 @@ async function withCameraTempDir<T>(run: (dir: string) => Promise<T>): Promise<T
|
35 | 35 | } |
36 | 36 | |
37 | 37 | async function expectPathMissing(targetPath: string): Promise<void> { |
38 | | -await expect(fs.stat(targetPath)).rejects.toMatchObject({ code: "ENOENT" }); |
| 38 | +try { |
| 39 | +await fs.stat(targetPath); |
| 40 | +} catch (error) { |
| 41 | +expect((error as NodeJS.ErrnoException).code).toBe("ENOENT"); |
| 42 | +return; |
| 43 | +} |
| 44 | +throw new Error(`expected missing path: ${targetPath}`); |
39 | 45 | } |
40 | 46 | |
41 | 47 | describe("nodes camera helpers", () => { |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。