mail/static/tests/emoji/emojis_mixin_tests.js
Данил Воробьев 6e6f15d803 initial commit
2024-05-03 09:40:35 +00:00

13 lines
464 B
JavaScript

/* @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);
});