Ghost/ghost/admin/tests/helpers/start-app.js
2017-01-19 13:32:36 +00:00

22 lines
624 B
JavaScript

import {assign} from 'ember-platform';
import run from 'ember-runloop';
import Application from '../../app';
import config from '../../config/environment';
// eslint-disable-next-line no-unused-vars
import fileUpload from './file-upload';
export default function startApp(attrs) {
let application;
let attributes = assign({}, config.APP);
attributes = assign(attributes, attrs); // use defaults, but you can override;
run(function () {
application = Application.create(attributes);
application.setupForTesting();
application.injectTestHelpers();
});
return application;
}