test: specify telegram file-ref chunks

This commit is contained in:
Shakker
2026-05-12 00:14:37 +01:00
parent d7a9248620
commit cb9881423d

View File

@@ -170,9 +170,12 @@ describe("markdownToTelegramHtml - file reference wrapping", () => {
describe("markdownToTelegramChunks - file reference wrapping", () => {
it("wraps file references in chunked output", () => {
const chunks = markdownToTelegramChunks("Check README.md and backup.sh", 4096);
expect(chunks.length).toBeGreaterThan(0);
expect(chunks[0].html).toContain("<code>README.md</code>");
expect(chunks[0].html).toContain("<code>backup.sh</code>");
expect(chunks).toStrictEqual([
{
html: "Check <code>README.md</code> and <code>backup.sh</code>",
text: "Check README.md and backup.sh",
},
]);
});
it("keeps rendered html chunks within the provided limit", () => {