import { render } from "@ember/test-helpers"; import hbs from "htmlbars-inline-precompile"; import { module, test } from "qunit"; import { setupRenderingTest } from "discourse/tests/helpers/component-test"; import { query } from "discourse/tests/helpers/qunit-helpers"; import fabricators from "discourse/plugins/chat/discourse/lib/fabricators"; module("Discourse Chat | Component | chat-thread-list-item", function (hooks) { setupRenderingTest(hooks); test("it safely renders title", async function (assert) { const title = ""; this.thread = fabricators.thread({ title }); await render(hbs` `); assert.equal( query(".chat-thread-list-item__title").innerHTML.trim(), "<style>body { background: red;}</style>" ); }); });