test(plugins): separate activation-scoped web search ids · openclaw/openclaw@e2b52f2
steipete
·
2026-06-19
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -11,6 +11,9 @@ function resolveBundledManifestProviderPluginIds() {
|
11 | 11 | } |
12 | 12 | |
13 | 13 | const ACTIVATION_SCOPED_WEB_SEARCH_PLUGIN_IDS = ["codex", "qa-lab"] as const; |
| 14 | +const ACTIVATION_SCOPED_WEB_SEARCH_PLUGIN_ID_SET = new Set<string>( |
| 15 | +ACTIVATION_SCOPED_WEB_SEARCH_PLUGIN_IDS, |
| 16 | +); |
14 | 17 | |
15 | 18 | function expectPluginAllowlistEquals( |
16 | 19 | allow: string[] | undefined, |
@@ -61,13 +64,17 @@ describe("plugin loader contract", () => {
|
61 | 64 | }); |
62 | 65 | |
63 | 66 | it("keeps bundled web search loading scoped to the web search registry", () => { |
| 67 | +const loaderScopedPluginIds = bundledWebSearchPluginIds.filter( |
| 68 | +(pluginId) => !ACTIVATION_SCOPED_WEB_SEARCH_PLUGIN_ID_SET.has(pluginId), |
| 69 | +); |
64 | 70 | const expectedPluginIds = uniqueSortedStrings([ |
65 | | - ...bundledWebSearchPluginIds, |
| 71 | + ...loaderScopedPluginIds, |
66 | 72 | ...ACTIVATION_SCOPED_WEB_SEARCH_PLUGIN_IDS, |
67 | 73 | ]); |
| 74 | + |
68 | 75 | expect(webSearchPluginIds).toEqual(expectedPluginIds); |
69 | 76 | expect( |
70 | | -webSearchPluginIds.filter((pluginId) => !bundledWebSearchPluginIds.includes(pluginId)), |
| 77 | +webSearchPluginIds.filter((pluginId) => !loaderScopedPluginIds.includes(pluginId)), |
71 | 78 | ).toEqual([...ACTIVATION_SCOPED_WEB_SEARCH_PLUGIN_IDS]); |
72 | 79 | }); |
73 | 80 | }); |
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。