mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 14:03:30 +00:00
node tests: Get 100% coverage on rendered_markdown.
This commit is contained in:
@@ -148,6 +148,15 @@ run_test("user-mention (email)", () => {
|
|||||||
assert.equal($mention.text(), "@Cordelia Lear");
|
assert.equal($mention.text(), "@Cordelia Lear");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
run_test("user-mention (missing)", () => {
|
||||||
|
const $content = get_content_element();
|
||||||
|
const $mention = $.create("mention");
|
||||||
|
$content.set_find_results(".user-mention", $array([$mention]));
|
||||||
|
|
||||||
|
rm.update_elements($content);
|
||||||
|
assert(!$mention.hasClass("user-mention-me"));
|
||||||
|
});
|
||||||
|
|
||||||
run_test("user-group-mention", () => {
|
run_test("user-group-mention", () => {
|
||||||
// Setup
|
// Setup
|
||||||
const $content = get_content_element();
|
const $content = get_content_element();
|
||||||
@@ -183,6 +192,16 @@ run_test("user-group-mention (error)", () => {
|
|||||||
assert(!$group.hasClass("user-mention-me"));
|
assert(!$group.hasClass("user-mention-me"));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
run_test("user-group-mention (missing)", () => {
|
||||||
|
const $content = get_content_element();
|
||||||
|
const $group = $.create("whatever");
|
||||||
|
$content.set_find_results(".user-group-mention", $array([$group]));
|
||||||
|
|
||||||
|
rm.update_elements($content);
|
||||||
|
|
||||||
|
assert(!$group.hasClass("user-mention-me"));
|
||||||
|
});
|
||||||
|
|
||||||
run_test("stream-links", () => {
|
run_test("stream-links", () => {
|
||||||
// Setup
|
// Setup
|
||||||
const $content = get_content_element();
|
const $content = get_content_element();
|
||||||
|
|||||||
@@ -110,7 +110,6 @@ EXEMPT_FILES = {
|
|||||||
"static/js/recent_topics.js",
|
"static/js/recent_topics.js",
|
||||||
"static/js/reload.js",
|
"static/js/reload.js",
|
||||||
"static/js/reminder.js",
|
"static/js/reminder.js",
|
||||||
"static/js/rendered_markdown.js",
|
|
||||||
"static/js/resize.js",
|
"static/js/resize.js",
|
||||||
"static/js/rows.js",
|
"static/js/rows.js",
|
||||||
"static/js/scroll_bar.js",
|
"static/js/scroll_bar.js",
|
||||||
|
|||||||
Reference in New Issue
Block a user