test: tighten install source cleanup assertion · openclaw/openclaw@05168dd
steipete
·
2026-05-09
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -20,6 +20,10 @@ async function createTempDir(prefix: string) {
|
20 | 20 | return await tempDirs.make(prefix); |
21 | 21 | } |
22 | 22 | |
| 23 | +async function expectPathMissing(targetPath: string): Promise<void> { |
| 24 | +await expect(fs.stat(targetPath)).rejects.toMatchObject({ code: "ENOENT" }); |
| 25 | +} |
| 26 | + |
23 | 27 | async function createFixtureDir() { |
24 | 28 | return await createTempDir(TEMP_DIR_PREFIX); |
25 | 29 | } |
@@ -112,7 +116,7 @@ describe("withTempDir", () => {
|
112 | 116 | }); |
113 | 117 | |
114 | 118 | expect(value).toBe("done"); |
115 | | -await expect(fs.stat(observedDir)).rejects.toThrow(); |
| 119 | +await expectPathMissing(observedDir); |
116 | 120 | }); |
117 | 121 | }); |
118 | 122 | |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。