Revert "Revert Ember.run refactors"

This reverts commit fcb1ca52f96bdff1a49d558a4ffb18107d8334de.
This commit is contained in:
Robin Ward
2019-10-30 09:48:24 -04:00
parent 8e6ad99e92
commit 8d34f4bbd9
153 changed files with 493 additions and 319 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);