This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/app/assets/javascripts/discourse/tests/integration/components/empty-state-test.js
Jarek Radosz 189bebb2e4
DEV: Modernize component tests (#17368)
* Use QUnit `module` instead of `discourseModule`
* Use QUnit `test` instead of `componentTest`
* Use angle-bracket syntax
* Remove jQuery usage
* Improve assertions (and actually fix some of them)
2022-07-11 12:29:44 +02:00

17 lines
637 B
JavaScript

import { module, test } from "qunit";
import { setupRenderingTest } from "discourse/tests/helpers/component-test";
import { render } from "@ember/test-helpers";
import { query } from "discourse/tests/helpers/qunit-helpers";
import hbs from "htmlbars-inline-precompile";
module("Integration | Component | empty-state", function (hooks) {
setupRenderingTest(hooks);
test("it renders", async function (assert) {
await render(hbs`<EmptyState @title="title" @body="body" />`);
assert.strictEqual(query("[data-test-title]").textContent, "title");
assert.strictEqual(query("[data-test-body]").textContent, "body");
});
});