discourse/app/assets/javascripts/wizard/test/helpers/start-app.js.es6
Robin Ward 8d34f4bbd9 Revert "Revert Ember.run refactors"
This reverts commit fcb1ca52f9.
2019-10-30 09:48:24 -04:00

20 lines
426 B
JavaScript

import { run } from "@ember/runloop";
import Wizard from "wizard/wizard";
import initializer from "wizard/initializers/load-helpers";
let app;
let started = false;
export default function() {
run(() => (app = Wizard.create({ rootElement: "#ember-testing" })));
if (!started) {
initializer.initialize(app);
app.start();
started = true;
}
app.setupForTesting();
app.injectTestHelpers();
return app;
}