test: tighten ci changed scope injection assertion · openclaw/openclaw@7e503bd
steipete
·
2026-05-09
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -578,7 +578,14 @@ describe("detectChangedScope", () => {
|
578 | 578 | ? `HEAD & echo injected > "${markerPath}" & rem` |
579 | 579 | : `HEAD; touch "${markerPath}" #`; |
580 | 580 | |
581 | | -expect(() => listChangedPaths(injectedBase, "HEAD")).toThrow(); |
| 581 | +let error: unknown; |
| 582 | +try { |
| 583 | +listChangedPaths(injectedBase, "HEAD"); |
| 584 | +} catch (caught) { |
| 585 | +error = caught; |
| 586 | +} |
| 587 | +expect(error).toBeInstanceOf(Error); |
| 588 | +expect((error as Error).message).toContain(injectedBase); |
582 | 589 | expect(fs.existsSync(markerPath)).toBe(false); |
583 | 590 | }); |
584 | 591 | |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。