test: clarify plugin extension boundary assertions · openclaw/openclaw@6bb3678
steipete
·
2026-05-08
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -20,22 +20,28 @@ const baseline = JSON.parse(readFileSync(baselinePath, "utf8"));
|
20 | 20 | describe("plugin extension import boundary inventory", () => { |
21 | 21 | it("keeps dedicated web-search registry shims out of the remaining inventory", async () => { |
22 | 22 | const inventory = await collectPluginExtensionImportBoundaryInventory(); |
| 23 | +const blockedShimFiles = inventory |
| 24 | +.filter( |
| 25 | +(entry) => |
| 26 | +entry.file === "src/plugins/web-search-providers.ts" || |
| 27 | +entry.file === "src/plugins/bundled-web-search-registry.ts", |
| 28 | +) |
| 29 | +.map((entry) => entry.file); |
23 | 30 | |
24 | | -expect(inventory.some((entry) => entry.file === "src/plugins/web-search-providers.ts")).toBe( |
25 | | -false, |
26 | | -); |
27 | | -expect( |
28 | | -inventory.some((entry) => entry.file === "src/plugins/bundled-web-search-registry.ts"), |
29 | | -).toBe(false); |
| 31 | +expect(blockedShimFiles).toEqual([]); |
30 | 32 | }); |
31 | 33 | |
32 | 34 | it("ignores boundary shims by scope", async () => { |
33 | 35 | const inventory = await collectPluginExtensionImportBoundaryInventory(); |
| 36 | +const boundaryShimFiles = inventory |
| 37 | +.filter( |
| 38 | +(entry) => |
| 39 | +entry.file.startsWith("src/plugin-sdk/") || |
| 40 | +entry.file.startsWith("src/plugin-sdk-internal/"), |
| 41 | +) |
| 42 | +.map((entry) => entry.file); |
34 | 43 | |
35 | | -expect(inventory.some((entry) => entry.file.startsWith("src/plugin-sdk/"))).toBe(false); |
36 | | -expect(inventory.some((entry) => entry.file.startsWith("src/plugin-sdk-internal/"))).toBe( |
37 | | -false, |
38 | | -); |
| 44 | +expect(boundaryShimFiles).toEqual([]); |
39 | 45 | }); |
40 | 46 | |
41 | 47 | it("produces stable sorted output", async () => { |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。