mirror of
https://github.com/moltbot/moltbot.git
synced 2026-05-21 21:56:46 +00:00
26 lines
814 B
TypeScript
26 lines
814 B
TypeScript
import { vi } from "vitest";
|
|
import { loadBundledChannelSecretContractApi } from "./channel-contract-api.js";
|
|
|
|
const discordSecrets = loadBundledChannelSecretContractApi("discord");
|
|
if (!discordSecrets?.collectRuntimeConfigAssignments) {
|
|
throw new Error("Missing Discord secret contract api");
|
|
}
|
|
const discordAssignments = discordSecrets.collectRuntimeConfigAssignments;
|
|
|
|
vi.mock("../channels/plugins/bootstrap-registry.js", () => ({
|
|
getBootstrapChannelPlugin: (id: string) =>
|
|
id === "discord"
|
|
? {
|
|
secrets: {
|
|
collectRuntimeConfigAssignments: discordAssignments,
|
|
},
|
|
}
|
|
: undefined,
|
|
getBootstrapChannelSecrets: (id: string) =>
|
|
id === "discord"
|
|
? {
|
|
collectRuntimeConfigAssignments: discordAssignments,
|
|
}
|
|
: undefined,
|
|
}));
|