mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 23:10:43 +00:00
test: clarify irc chunk length assertion
This commit is contained in:
@@ -39,6 +39,10 @@ describe("irc protocol", () => {
|
||||
it("splits long text on boundaries", () => {
|
||||
const chunks = splitIrcText("a ".repeat(300), 120);
|
||||
expect(chunks.length).toBeGreaterThan(2);
|
||||
expect(chunks.every((chunk) => chunk.length <= 120)).toBe(true);
|
||||
expect(
|
||||
chunks
|
||||
.map((chunk, index) => ({ index, length: chunk.length }))
|
||||
.filter((chunk) => chunk.length > 120),
|
||||
).toEqual([]);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user