mirror of https://github.com/openclaw/openclaw.git
24 lines
868 B
TypeScript
24 lines
868 B
TypeScript
import { describe, expect, it } from "vitest";
|
|
import {
|
|
providerContractLoadError,
|
|
resolveProviderContractProvidersForPluginIds,
|
|
} from "../../../src/plugins/contracts/registry.js";
|
|
import { installProviderPluginContractSuite } from "../../../src/plugins/contracts/suites.js";
|
|
|
|
export function describeProviderContracts(pluginId: string) {
|
|
const providers = resolveProviderContractProvidersForPluginIds([pluginId]);
|
|
|
|
describe(`${pluginId} provider contract registry load`, () => {
|
|
it("loads bundled providers without import-time registry failure", () => {
|
|
expect(providerContractLoadError).toBeUndefined();
|
|
expect(providers.length).toBeGreaterThan(0);
|
|
});
|
|
});
|
|
|
|
for (const provider of providers) {
|
|
describe(`${pluginId}:${provider.id} provider contract`, () => {
|
|
installProviderPluginContractSuite({ provider });
|
|
});
|
|
}
|
|
}
|