mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 04:40:43 +00:00
test: align telegram reply assertions with streaming defaults
This commit is contained in:
@@ -2788,7 +2788,7 @@ describe("createTelegramBot", () => {
|
||||
});
|
||||
|
||||
expect(sendMessageSpy).toHaveBeenCalledTimes(1);
|
||||
expect(sendMessageSpy.mock.calls[0][0]).toBe("5");
|
||||
expect(String(sendMessageSpy.mock.calls[0][0])).toBe("5");
|
||||
expect(sendMessageSpy.mock.calls[0][1]).toBe(codexRateLimitText);
|
||||
expect(String(sendMessageSpy.mock.calls[0][1])).not.toContain(
|
||||
"All models are temporarily rate-limited",
|
||||
@@ -2807,6 +2807,11 @@ describe("createTelegramBot", () => {
|
||||
text: "a".repeat(4500),
|
||||
replyToId: String(messageId),
|
||||
});
|
||||
loadConfig.mockReturnValue({
|
||||
channels: {
|
||||
telegram: { dmPolicy: "open", allowFrom: ["*"], streamMode: "off" },
|
||||
},
|
||||
});
|
||||
|
||||
createTelegramBot({ token: "tok", replyToMode: mode });
|
||||
const handler = getOnHandler("message") as (ctx: Record<string, unknown>) => Promise<void>;
|
||||
|
||||
Reference in New Issue
Block a user