test: fix stale web search and boot-md contracts

This commit is contained in:
Ayaan Zaidi
2026-03-16 20:04:21 +05:30
parent 771fbeae79
commit ce1d95454f
3 changed files with 26 additions and 25 deletions

View File

@@ -75,15 +75,12 @@ describe("plugin loader contract", () => {
webSearchProviderContractRegistry.map((entry) => entry.pluginId),
);
resolvePluginWebSearchProviders({});
const providers = resolvePluginWebSearchProviders({});
expect(loadOpenClawPluginsMock).toHaveBeenCalledWith(
expect.objectContaining({
onlyPluginIds: webSearchPluginIds,
activate: false,
cache: false,
}),
expect(uniqueSortedPluginIds(providers.map((provider) => provider.pluginId))).toEqual(
webSearchPluginIds,
);
expect(loadOpenClawPluginsMock).not.toHaveBeenCalled();
});
it("keeps bundled web search allowlist compatibility wired to the web search registry", () => {
@@ -91,7 +88,7 @@ describe("plugin loader contract", () => {
webSearchProviderContractRegistry.map((entry) => entry.pluginId),
);
resolvePluginWebSearchProviders({
const providers = resolvePluginWebSearchProviders({
bundledAllowlistCompat: true,
config: {
plugins: {
@@ -100,15 +97,9 @@ describe("plugin loader contract", () => {
},
});
expect(loadOpenClawPluginsMock).toHaveBeenCalledWith(
expect.objectContaining({
config: expect.objectContaining({
plugins: expect.objectContaining({
allow: expect.arrayContaining(webSearchPluginIds),
}),
}),
onlyPluginIds: webSearchPluginIds,
}),
expect(uniqueSortedPluginIds(providers.map((provider) => provider.pluginId))).toEqual(
webSearchPluginIds,
);
expect(loadOpenClawPluginsMock).not.toHaveBeenCalled();
});
});