mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-16 10:00:00 +00:00
test: keep web provider artifact test in boundary
This commit is contained in:
parent
3e2bfcd84d
commit
841a1566ef
1 changed files with 20 additions and 3 deletions
|
|
@ -1,14 +1,25 @@
|
|||
import { describe, expect, it } from "vitest";
|
||||
import { resolveBundledContractSnapshotPluginIds } from "./contracts/inventory/bundled-capability-metadata.js";
|
||||
import { resolveManifestContractPluginIds } from "./manifest-registry.js";
|
||||
import {
|
||||
resolveBundledWebFetchProvidersFromPublicArtifacts,
|
||||
resolveBundledWebSearchProvidersFromPublicArtifacts,
|
||||
} from "./web-provider-public-artifacts.js";
|
||||
|
||||
function uniquePluginIds(entries: readonly { pluginId: string }[] | null): string[] {
|
||||
return [...new Set((entries ?? []).map((entry) => entry.pluginId))].toSorted((left, right) =>
|
||||
left.localeCompare(right),
|
||||
);
|
||||
}
|
||||
|
||||
describe("web provider public artifacts", () => {
|
||||
it("covers every bundled web search provider declared in manifests", () => {
|
||||
expect(resolveBundledContractSnapshotPluginIds("webSearchProviderIds")).toEqual(
|
||||
expect(
|
||||
uniquePluginIds(
|
||||
resolveBundledWebSearchProvidersFromPublicArtifacts({
|
||||
bundledAllowlistCompat: true,
|
||||
}),
|
||||
),
|
||||
).toEqual(
|
||||
resolveManifestContractPluginIds({
|
||||
contract: "webSearchProviders",
|
||||
origin: "bundled",
|
||||
|
|
@ -17,7 +28,13 @@ describe("web provider public artifacts", () => {
|
|||
});
|
||||
|
||||
it("covers every bundled web fetch provider declared in manifests", () => {
|
||||
expect(resolveBundledContractSnapshotPluginIds("webFetchProviderIds")).toEqual(
|
||||
expect(
|
||||
uniquePluginIds(
|
||||
resolveBundledWebFetchProvidersFromPublicArtifacts({
|
||||
bundledAllowlistCompat: true,
|
||||
}),
|
||||
),
|
||||
).toEqual(
|
||||
resolveManifestContractPluginIds({
|
||||
contract: "webFetchProviders",
|
||||
origin: "bundled",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue