test: consolidate provider and web-search contracts

This commit is contained in:
Peter Steinberger
2026-04-01 01:44:05 +01:00
parent b910cc5869
commit 63819bb383
57 changed files with 30 additions and 162 deletions

View File

@@ -0,0 +1,10 @@
import { describeBundledWebSearchFastPathContract } from "../../../test/helpers/plugins/bundled-web-search-fast-path-contract.js";
import { listBundledWebSearchProviders } from "../bundled-web-search.js";
const pluginIds = [
...new Set(listBundledWebSearchProviders().map((entry) => entry.pluginId)),
].toSorted();
for (const pluginId of pluginIds) {
describeBundledWebSearchFastPathContract(pluginId);
}

View File

@@ -0,0 +1,10 @@
import { describeProviderContracts } from "../../../test/helpers/plugins/provider-contract.js";
import { pluginRegistrationContractRegistry } from "./registry.js";
const providerContractTests = pluginRegistrationContractRegistry.filter(
(entry) => entry.providerIds.length > 0,
);
for (const entry of providerContractTests) {
describeProviderContracts(entry.pluginId);
}

View File

@@ -0,0 +1,10 @@
import { describeWebSearchProviderContracts } from "../../../test/helpers/plugins/web-search-provider-contract.js";
import { pluginRegistrationContractRegistry } from "./registry.js";
const webSearchProviderContractTests = pluginRegistrationContractRegistry.filter(
(entry) => entry.webSearchProviderIds.length > 0,
);
for (const entry of webSearchProviderContractTests) {
describeWebSearchProviderContracts(entry.pluginId);
}