Skip to content

Commit 5aa278c

Browse files
authored
merge: #12 from AgentBelfort/master
Add test for custom_emoji html
2 parents 63aae92 + d57daa6 commit 5aa278c

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

test.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,21 @@ Deno.test("URL entity inside bold must stringify to HTML correctly", () => {
4141
}),
4242
'<b>👉 Link :- </b><a href="https://example.com?x&y"><b>https://example.com?x&amp;y</b></a>',
4343
);
44+
45+
assertEquals(
46+
toHTML({
47+
text: "👍",
48+
entities: [
49+
{
50+
type: "custom_emoji",
51+
offset: 0,
52+
length: "👍".length,
53+
custom_emoji_id: "5368324170671202286",
54+
},
55+
],
56+
}),
57+
'<tg-emoji emoji-id="5368324170671202286">👍</tg-emoji>',
58+
);
4459
});
4560

4661
Deno.test("URL entity inside bold must stringify to Markdown correctly", () => {

0 commit comments

Comments
 (0)