test: tighten sbom risk report assertions · openclaw/openclaw@6697c61
steipete
·
2026-05-09
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -100,7 +100,7 @@ snapshots:
|
100 | 100 | |
101 | 101 | const report = collectSbomRiskReport({ repoRoot }); |
102 | 102 | |
103 | | -expect(report.summary).toMatchObject({ |
| 103 | +expect(report.summary).toEqual({ |
104 | 104 | buildRiskPackageCount: 1, |
105 | 105 | importerCount: 1, |
106 | 106 | lockfilePackageCount: 4, |
@@ -109,10 +109,19 @@ snapshots:
|
109 | 109 | rootOwnershipRecordCount: 2, |
110 | 110 | }); |
111 | 111 | expect(report.ownershipGaps).toEqual(["missing-owner"]); |
112 | | -expect(report.topRootDependencyCones[0]).toMatchObject({ |
| 112 | +expect(report.topRootDependencyCones[0]).toEqual({ |
| 113 | +class: "core-runtime", |
113 | 114 | closureSize: 3, |
| 115 | +missingSnapshotKeys: [], |
114 | 116 | name: "core-lib", |
115 | 117 | owner: "core:test", |
| 118 | +resolved: "1.0.0", |
| 119 | +risk: ["network"], |
| 120 | +section: "dependencies", |
| 121 | +sourceCategory: "unreferenced", |
| 122 | +sourceFileCount: 0, |
| 123 | +sourceSections: [], |
| 124 | +specifier: "1.0.0", |
116 | 125 | }); |
117 | 126 | expect(collectSbomRiskCheckErrors(report)).toEqual([ |
118 | 127 | "root dependency 'missing-owner' is missing from scripts/lib/dependency-ownership.json", |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。