REFACTOR: Use imports for Ember.run

This commit is contained in:
Robin Ward
2019-10-29 14:52:36 -04:00
parent c7475ee03b
commit 5ca60fcb6b
151 changed files with 485 additions and 270 deletions

View File

@ -1,3 +1,5 @@
import { run } from "@ember/runloop";
import { later } from "@ember/runloop";
/* global QUnit, resetSite */
import sessionFixtures from "fixtures/session-fixtures";
@ -155,7 +157,7 @@ export function controllerFor(controller, model) {
export function asyncTestDiscourse(text, func) {
QUnit.test(text, function(assert) {
const done = assert.async();
Ember.run(() => {
run(() => {
func.call(this, assert);
done();
});
@ -206,7 +208,7 @@ export function waitFor(assert, callback, timeout) {
timeout = timeout || 500;
const done = assert.async();
Ember.run.later(() => {
later(() => {
callback();
done();
}, timeout);