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:
Steve Howell
2020-07-25 16:17:37 +00:00
committed by Tim Abbott
parent 7bb5fac8e0
commit 49db62c240
3 changed files with 10 additions and 19 deletions

View File

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