Skip to content

A platform for community discussion. Free, open, simple.

DEV: Silence discourse.custom_html_template in its own test (#20414)

David Taylorcf0c73d1b774
diff --git a/app/assets/javascripts/discourse/tests/acceptance/custom-html-template-test.js b/app/assets/javascripts/discourse/tests/acceptance/custom-html-template-test.js
index d141fd61a0d..71d65351bb7 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/custom-html-template-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/custom-html-template-test.js
@@ -3,6 +3,7 @@ import { hbs } from "ember-cli-htmlbars";
import { test } from "qunit";
import { visit } from "@ember/test-helpers";
import { registerTemporaryModule } from "discourse/tests/helpers/temporary-module-helper";
+import { withSilencedDeprecationsAsync } from "discourse-common/lib/deprecated";
acceptance("CustomHTML template", function (needs) {
needs.hooks.beforeEach(() => {
@@ -13,11 +14,16 @@ acceptance("CustomHTML template", function (needs) {
});
test("renders custom template", async function (assert) {
- await visit("/static/faq");
- assert.strictEqual(
- query("span.top-span").innerText,
- "TOP",
- "it inserted the template"
+ await withSilencedDeprecationsAsync(
+ "discourse.custom_html_template",
+ async () => {
+ await visit("/static/faq");
+ assert.strictEqual(
+ query("span.top-span").innerText,
+ "TOP",
+ "it inserted the template"
+ );
+ }
);
});
});