discourse/plugins/chat/test/javascripts/components/chat-emoji-avatar-test.gjs
David Taylor 9322a46fa4
DEV: Remove unneeded const self = this; from qunit tests (#35632)
This was required in older versions of Ember. But now, bare template
tags can access `this.`. This commit was created by upgrading lint-configs, and then running 
`pnpm lint:js:fix && pnpm lint:prettier:fix`

Rule development: https://github.com/discourse/lint-configs/pull/154
2025-10-27 18:07:22 +00:00

22 lines
687 B
Text
Vendored

import { render } from "@ember/test-helpers";
import { module, test } from "qunit";
import { setupRenderingTest } from "discourse/tests/helpers/component-test";
import ChatEmojiAvatar from "discourse/plugins/chat/discourse/components/chat-emoji-avatar";
module("Discourse Chat | Component | chat-emoji-avatar", function (hooks) {
setupRenderingTest(hooks);
test("uses an emoji as avatar", async function (assert) {
this.set("emoji", ":otter:");
await render(
<template><ChatEmojiAvatar @emoji={{this.emoji}} /></template>
);
assert
.dom(
".chat-emoji-avatar .chat-emoji-avatar-container .emoji[title=otter]"
)
.exists();
});
});