mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 18:20:42 +00:00
26 lines
804 B
TypeScript
26 lines
804 B
TypeScript
import { vi } from "vitest";
|
|
import { loadBundledChannelSecretContractApi } from "./channel-contract-api.js";
|
|
|
|
const matrixSecrets = loadBundledChannelSecretContractApi("matrix");
|
|
if (!matrixSecrets?.collectRuntimeConfigAssignments) {
|
|
throw new Error("Missing Matrix secret contract api");
|
|
}
|
|
const matrixAssignments = matrixSecrets.collectRuntimeConfigAssignments;
|
|
|
|
vi.mock("../channels/plugins/bootstrap-registry.js", () => ({
|
|
getBootstrapChannelPlugin: (id: string) =>
|
|
id === "matrix"
|
|
? {
|
|
secrets: {
|
|
collectRuntimeConfigAssignments: matrixAssignments,
|
|
},
|
|
}
|
|
: undefined,
|
|
getBootstrapChannelSecrets: (id: string) =>
|
|
id === "matrix"
|
|
? {
|
|
collectRuntimeConfigAssignments: matrixAssignments,
|
|
}
|
|
: undefined,
|
|
}));
|