Files
clawdbot/extensions/zalouser/src/channel.test.ts
tsu 390bd11f33 feat: add zalouser channel + directory CLI (#1032) (thanks @suminhthanh)
- Unified UX: channels login + message send; no plugin-specific top-level command\n- Added generic directory CLI for channel identity/groups\n- Docs: channel + plugin pages
2026-01-16 21:28:18 +00:00

19 lines
597 B
TypeScript

import { describe, expect, it } from "vitest";
import { zalouserPlugin } from "./channel.js";
describe("zalouser outbound chunker", () => {
it("chunks without empty strings and respects limit", () => {
const chunker = zalouserPlugin.outbound?.chunker;
expect(chunker).toBeTypeOf("function");
if (!chunker) return;
const limit = 10;
const chunks = chunker("hello world\nthis is a test", limit);
expect(chunks.length).toBeGreaterThan(1);
expect(chunks.every((c) => c.length > 0)).toBe(true);
expect(chunks.every((c) => c.length <= limit)).toBe(true);
});
});