Merged via squash. Prepared head SHA: 09f24ceba9118243aa77f112a816112e3fb47c1b Co-authored-by: ForestDengHK <189603301+ForestDengHK@users.noreply.github.com> Co-authored-by: mbelinky <132747814+mbelinky@users.noreply.github.com> Reviewed-by: @mbelinky
15 lines
558 B
TypeScript
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);
|
|
});
|
|
});
|