Files
openclaw/extensions/telegram/src/telegram-outbound.test.ts
ForestDengHK e79e25667a fix(telegram): restore outbound message splitting for long messages (#57816)
Merged via squash.

Prepared head SHA: 09f24ceba9
Co-authored-by: ForestDengHK <189603301+ForestDengHK@users.noreply.github.com>
Co-authored-by: mbelinky <132747814+mbelinky@users.noreply.github.com>
Reviewed-by: @mbelinky
2026-04-06 14:28:37 +02:00

15 lines
558 B
TypeScript

import { chunkMarkdownText } from "openclaw/plugin-sdk/reply-runtime";
import { describe, expect, it } from "vitest";
import { telegramPlugin } from "./channel.js";
import { clearTelegramRuntime } from "./runtime.js";
describe("telegramPlugin outbound", () => {
it("uses static chunking when Telegram runtime is uninitialized", () => {
clearTelegramRuntime();
const text = `${"hello\n".repeat(1200)}tail`;
const expected = chunkMarkdownText(text, 4000);
expect(telegramPlugin.outbound?.chunker?.(text, 4000)).toEqual(expected);
});
});