mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 05:23:35 +00:00
refactor: Have markdown depend directly on emoji.
Now that emoji is in our shared library, we can require it directly from markdown without re-introducing any `window` dependencies.
This commit is contained in:
@@ -758,13 +758,12 @@ run_test("missing unicode emojis", () => {
|
||||
// return undefined
|
||||
}
|
||||
|
||||
const config = {
|
||||
...markdown_config.get_helpers(),
|
||||
get_emoji_name: fake_get_emoji_name,
|
||||
};
|
||||
|
||||
markdown.initialize(page_params.realm_filters, config);
|
||||
const actual_get_emoji_name = emoji.get_emoji_name;
|
||||
emoji.get_emoji_name = fake_get_emoji_name;
|
||||
|
||||
markdown.apply_markdown(message);
|
||||
assert.equal(message.content, "<p>\u{1f6b2}</p>");
|
||||
|
||||
// restore get_emoji_name for any future tests that follow
|
||||
emoji.get_emoji_name = actual_get_emoji_name;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user