test: simplify pi package missing scan · openclaw/openclaw@1968db9
steipete
·
2026-05-09
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -37,6 +37,16 @@ function readPiDependencySpecs() {
|
37 | 37 | })); |
38 | 38 | } |
39 | 39 | |
| 40 | +function collectMissingSpecNames(specs: Array<{ name: string; spec?: string }>): string[] { |
| 41 | +const names: string[] = []; |
| 42 | +for (const entry of specs) { |
| 43 | +if (!entry.spec) { |
| 44 | +names.push(entry.name); |
| 45 | +} |
| 46 | +} |
| 47 | +return names; |
| 48 | +} |
| 49 | + |
40 | 50 | function expectNoGraphViolations(violations: string[], message: string) { |
41 | 51 | expect(violations, message).toEqual([]); |
42 | 52 | } |
@@ -45,7 +55,7 @@ describe("pi package graph guardrails", () => {
|
45 | 55 | it("keeps root Pi packages aligned to the same exact version", () => { |
46 | 56 | const specs = readPiDependencySpecs(); |
47 | 57 | |
48 | | -const missing = specs.filter((entry) => !entry.spec).map((entry) => entry.name); |
| 58 | +const missing = collectMissingSpecNames(specs); |
49 | 59 | expectNoGraphViolations( |
50 | 60 | missing, |
51 | 61 | `Missing required root Pi dependencies: ${missing.join(", ") || "<none>"}. Mixed or incomplete Pi root dependencies create an unsupported package graph.`, |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。