mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 11:50:43 +00:00
test: satisfy plugin contract boundaries
This commit is contained in:
@@ -220,7 +220,11 @@ describe("prepareBundledPluginRuntimeRoot", () => {
|
||||
);
|
||||
fs.writeFileSync(
|
||||
path.join(runtimePluginRoot, "index.js"),
|
||||
`export { default } from "../../../dist/extensions/qqbot/index.js";\n`,
|
||||
[
|
||||
"export { default } from ",
|
||||
JSON.stringify("../../../dist/extensions/qqbot/index.js"),
|
||||
";\n",
|
||||
].join(""),
|
||||
"utf8",
|
||||
);
|
||||
fs.writeFileSync(
|
||||
|
||||
@@ -3,12 +3,12 @@ import type { ResolvedTtsConfig, SpeechProviderPlugin } from "openclaw/plugin-sd
|
||||
import type { OpenClawConfig } from "openclaw/plugin-sdk/testing";
|
||||
import {
|
||||
createEmptyPluginRegistry,
|
||||
pluginRegistrationContractRegistry,
|
||||
setActivePluginRegistry,
|
||||
withEnv,
|
||||
withEnvAsync,
|
||||
} from "openclaw/plugin-sdk/testing";
|
||||
import { beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import { BUNDLED_PLUGIN_CONTRACT_SNAPSHOTS } from "../../../src/plugins/contracts/inventory/bundled-capability-metadata.js";
|
||||
import { resolveWorkspacePackagePublicModuleUrl } from "./public-surface-loader.js";
|
||||
|
||||
type TtsRuntimeModule = typeof import("openclaw/plugin-sdk/tts-runtime");
|
||||
@@ -42,7 +42,7 @@ let sanitizeTtsErrorForLog: TtsRuntimeModule["_test"]["sanitizeTtsErrorForLog"];
|
||||
|
||||
const SPEECH_PROVIDER_ENV_KEYS = [
|
||||
...new Set(
|
||||
BUNDLED_PLUGIN_CONTRACT_SNAPSHOTS.flatMap((entry) =>
|
||||
pluginRegistrationContractRegistry.flatMap((entry) =>
|
||||
entry.speechProviderIds.flatMap((providerId) => entry.providerAuthEnvVars[providerId] ?? []),
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user