mirror of
https://github.com/discourse/discourse.git
synced 2024-12-08 22:56:19 +08:00
48193767bf
Automatically generated by `eslint --fix` to satisfy the updated configuration
28 lines
904 B
JavaScript
28 lines
904 B
JavaScript
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";
|
|
|
|
module(
|
|
"Discourse Chat | Component | chat-message-separator-date",
|
|
function (hooks) {
|
|
setupRenderingTest(hooks);
|
|
|
|
test("first message of the day", async function (assert) {
|
|
this.set("date", moment().format("LLL"));
|
|
this.set("message", { formattedFirstMessageDate: this.date });
|
|
this.set("fetchMessagesByDate", () => {});
|
|
|
|
await render(
|
|
hbs`<ChatMessageSeparatorDate @message={{this.message}} @fetchMessagesByDate={{this.fetchMessagesByDate}} />`
|
|
);
|
|
|
|
assert.strictEqual(
|
|
query(".chat-message-separator-date").innerText.trim(),
|
|
this.date
|
|
);
|
|
});
|
|
}
|
|
);
|