test: clarify irc chunk length assertion

This commit is contained in:
Peter Steinberger
2026-05-08 07:54:36 +01:00
parent af49c09d13
commit fc31e86e54

View File

@@ -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([]);
});
});