mirror of
https://github.com/discourse/discourse.git
synced 2026-08-14 06:55:03 -05: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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user