fix: stabilize plugin-sdk test loading

This commit is contained in:
Peter Steinberger
2026-03-27 13:14:11 +00:00
parent 9d10a2e242
commit b5a8d5a230
10 changed files with 524 additions and 104 deletions

View File

@@ -1,6 +1,18 @@
import { describe, expect, it } from "vitest";
import { webSearchProviderContractRegistry } from "./registry.js";
import { installWebSearchProviderContractSuite } from "./suites.js";
import { afterAll, describe, expect, it } from "vitest";
const previousPreferDistPluginSdk = process.env.OPENCLAW_PLUGIN_SDK_PREFER_DIST;
process.env.OPENCLAW_PLUGIN_SDK_PREFER_DIST = "1";
const { webSearchProviderContractRegistry } = await import("./registry.js");
const { installWebSearchProviderContractSuite } = await import("./suites.js");
afterAll(() => {
if (previousPreferDistPluginSdk === undefined) {
delete process.env.OPENCLAW_PLUGIN_SDK_PREFER_DIST;
} else {
process.env.OPENCLAW_PLUGIN_SDK_PREFER_DIST = previousPreferDistPluginSdk;
}
});
describe("web search provider contract registry load", () => {
it("loads bundled web search providers", () => {