mirror of
https://github.com/Aviortheking/codestats-readme.git
synced 2025-07-28 14:59:53 +00:00
feat(repocard): parse emojis in description (#67)
* feat: add remove_emojis option Removes emojis in repo card description * feat: parse emojis * feat: rename remove_emojis to show_emojis option for consistency * docs: update docs Co-authored-by: anuraghazra <hazru.anurag@gmail.com>
This commit is contained in:
@ -73,6 +73,18 @@ describe("Test renderRepoCard", () => {
|
||||
);
|
||||
});
|
||||
|
||||
it("should render emojis", () => {
|
||||
document.body.innerHTML = renderRepoCard({
|
||||
...data_repo.repository,
|
||||
description: "This is a text with a :poop: poo emoji",
|
||||
});
|
||||
|
||||
// poop emoji may not show in all editors but it's there between "a" and "poo"
|
||||
expect(document.getElementsByClassName("description")[0]).toHaveTextContent(
|
||||
"This is a text with a 💩 poo emoji"
|
||||
);
|
||||
});
|
||||
|
||||
it("should shift the text position depending on language length", () => {
|
||||
document.body.innerHTML = renderRepoCard({
|
||||
...data_repo.repository,
|
||||
|
Reference in New Issue
Block a user