1
0
Fork 0
discourse-custom-wizard-unl.../assets/javascripts/wizard/tests/helpers/start-app.js.es6

26 Zeilen
689 B
Text

2022-06-15 08:59:09 +02:00
const CustomWizard = requirejs(
"discourse/plugins/discourse-custom-wizard/wizard/application"
).default;
const initializer = requirejs(
"discourse/plugins/discourse-custom-wizard/wizard/lib/initialize/wizard"
).default;
const siteSettings = requirejs(
"discourse/plugins/discourse-custom-wizard/wizard/tests/fixtures/site-settings"
).default;
2022-03-16 12:33:34 +01:00
const { cloneJSON } = requirejs("discourse-common/lib/object").default;
let app;
export default function () {
app = CustomWizard.create({ rootElement: "#ember-testing" });
app.start();
app.SiteSettings = cloneJSON(siteSettings);
initializer.initialize(app);
app.setupForTesting();
app.injectTestHelpers();
return app;
}