mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-19 21:21:10 +00:00
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
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);
|
|
});
|
|
});
|