mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-07 10:51:23 +00:00
test: dedupe auto-reply web and signal flows
This commit is contained in:
16
src/auto-reply/reply/commands-subagents.test-mocks.ts
Normal file
16
src/auto-reply/reply/commands-subagents.test-mocks.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import { vi } from "vitest";
|
||||
|
||||
export function installSubagentsCommandCoreMocks() {
|
||||
vi.mock("../../config/config.js", async (importOriginal) => {
|
||||
const actual = await importOriginal<typeof import("../../config/config.js")>();
|
||||
return {
|
||||
...actual,
|
||||
loadConfig: () => ({}),
|
||||
};
|
||||
});
|
||||
|
||||
// Prevent transitive import chain from reaching discord/monitor which needs https-proxy-agent.
|
||||
vi.mock("../../discord/monitor/gateway-plugin.js", () => ({
|
||||
createDiscordGatewayPlugin: () => ({}),
|
||||
}));
|
||||
}
|
||||
Reference in New Issue
Block a user