mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-17 14:20:44 +00:00
25 lines
771 B
TypeScript
25 lines
771 B
TypeScript
import { vi } from "vitest";
|
|
import { loadBundledChannelSecretContractApi } from "./channel-contract-api.js";
|
|
|
|
const zaloSecrets = loadBundledChannelSecretContractApi("zalo");
|
|
if (!zaloSecrets?.collectRuntimeConfigAssignments) {
|
|
throw new Error("Missing Zalo secret contract api");
|
|
}
|
|
|
|
vi.mock("../channels/plugins/bootstrap-registry.js", () => ({
|
|
getBootstrapChannelPlugin: (id: string) =>
|
|
id === "zalo"
|
|
? {
|
|
secrets: {
|
|
collectRuntimeConfigAssignments: zaloSecrets.collectRuntimeConfigAssignments,
|
|
},
|
|
}
|
|
: undefined,
|
|
getBootstrapChannelSecrets: (id: string) =>
|
|
id === "zalo"
|
|
? {
|
|
collectRuntimeConfigAssignments: zaloSecrets.collectRuntimeConfigAssignments,
|
|
}
|
|
: undefined,
|
|
}));
|