mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 14:38:25 +00:00
perf: speed up telegram bot suite setup
This commit is contained in:
@@ -228,16 +228,31 @@ export function makeForumGroupMessageCtx(params?: {
|
||||
|
||||
beforeEach(() => {
|
||||
resetInboundDedupe();
|
||||
loadConfig.mockReset();
|
||||
loadConfig.mockReturnValue({
|
||||
agents: {
|
||||
defaults: {
|
||||
envelopeTimezone: "utc",
|
||||
},
|
||||
},
|
||||
channels: {
|
||||
telegram: { dmPolicy: "open", allowFrom: ["*"] },
|
||||
},
|
||||
});
|
||||
loadWebMedia.mockReset();
|
||||
readChannelAllowFromStore.mockReset();
|
||||
readChannelAllowFromStore.mockResolvedValue([]);
|
||||
upsertChannelPairingRequest.mockReset();
|
||||
upsertChannelPairingRequest.mockResolvedValue({ code: "PAIRCODE", created: true } as const);
|
||||
onSpy.mockReset();
|
||||
commandSpy.mockReset();
|
||||
stopSpy.mockReset();
|
||||
useSpy.mockReset();
|
||||
replySpy.mockReset();
|
||||
replySpy.mockImplementation(async (_ctx, opts) => {
|
||||
await opts?.onReplyStart?.();
|
||||
return undefined;
|
||||
});
|
||||
|
||||
sendAnimationSpy.mockReset();
|
||||
sendAnimationSpy.mockResolvedValue({ message_id: 78 });
|
||||
|
||||
Reference in New Issue
Block a user