node tests: Test wildcard mentions.

This commit is contained in:
Steve Howell 2021-05-25 20:16:25 +00:00 committed by Tim Abbott
parent 69c92e9bee
commit ab9d954cf1
1 changed files with 12 additions and 0 deletions

View File

@ -126,6 +126,18 @@ run_test("user-mention", () => {
assert.equal($cordelia.text(), `@${cordelia.full_name}`);
});
run_test("user-mention (wildcard)", () => {
// Setup
const $content = get_content_element();
const $mention = $.create("mention");
$mention.attr("data-user-id", "*");
$content.set_find_results(".user-mention", $array([$mention]));
assert(!$mention.hasClass("user-mention-me"));
rm.update_elements($content);
assert($mention.hasClass("user-mention-me"));
});
run_test("user-group-mention", () => {
// Setup
const $content = get_content_element();