mirror of
https://github.com/discourse/discourse.git
synced 2025-03-24 11:18:56 +08:00
DEV: Fix this.clearRender
deprecation warning (#17150)
``` {"type":"warn","text":"DEPRECATION: Using this.clearRender has been deprecated, consider using `clearRender` imported from `@ember/test-helpers`. [deprecation id: ember-test-helpers.setup-rendering-context.clearRender]"} ```
This commit is contained in:
parent
93b8811f08
commit
051167c98a
@ -1,4 +1,5 @@
|
||||
import Component from "@ember/component";
|
||||
import { clearRender } from "@ember/test-helpers";
|
||||
import discourseComputed, {
|
||||
afterRender,
|
||||
} from "discourse-common/utils/decorators";
|
||||
@ -55,7 +56,7 @@ discourseModule("Unit | Utils | decorators", function (hooks) {
|
||||
assert.ok(exists(document.querySelector(".foo-component")));
|
||||
assert.strictEqual(this.baz, 1);
|
||||
|
||||
await this.clearRender();
|
||||
await clearRender();
|
||||
|
||||
assert.ok(!exists(document.querySelector(".foo-component")));
|
||||
assert.strictEqual(this.baz, 1);
|
||||
|
Loading…
x
Reference in New Issue
Block a user