mail/static/tests/emoji/emojis_mixin_tests.js

13 lines
464 B
JavaScript
Raw Normal View History

2024-05-03 12:40:35 +03:00
/* @odoo-module */
import { formatText } from "@mail/js/emojis_mixin";
QUnit.module("emojis mixin");
QUnit.test("Emoji formatter handles compound emojis", (assert) => {
const testString = "👩🏿test👩🏿👩t👩";
const expectedString =
"<span class='o_mail_emoji'>👩🏿</span>test<span class='o_mail_emoji'>👩🏿👩</span>t<span class='o_mail_emoji'>👩</span>";
assert.deepEqual(formatText(testString), expectedString);
});