discourse/app/assets/javascripts/wizard/test/helpers/start-app.js.es6

19 lines
394 B
Plaintext
Raw Normal View History

2018-06-15 23:03:24 +08:00
import Wizard from "wizard/wizard";
import initializer from "wizard/initializers/load-helpers";
2016-09-14 03:14:17 +08:00
let app;
let started = false;
export default function() {
2018-06-15 23:03:24 +08:00
Ember.run(() => (app = Wizard.create({ rootElement: "#ember-testing" })));
2016-09-14 03:14:17 +08:00
if (!started) {
2016-11-26 03:29:24 +08:00
initializer.initialize(app);
2016-09-14 03:14:17 +08:00
app.start();
started = true;
}
app.setupForTesting();
app.injectTestHelpers();
return app;
}