mirror of
https://github.com/flarum/framework.git
synced 2024-12-12 22:53:37 +08:00
20 lines
482 B
JavaScript
20 lines
482 B
JavaScript
import Ember from 'ember';
|
|
import Application from '../../app';
|
|
import Router from '../../router';
|
|
import config from '../../config/environment';
|
|
|
|
export default function startApp(attrs) {
|
|
var App;
|
|
|
|
var attributes = Ember.merge({}, config.APP);
|
|
attributes = Ember.merge(attributes, attrs); // use defaults, but you can override;
|
|
|
|
Ember.run(function() {
|
|
App = Application.create(attributes);
|
|
App.setupForTesting();
|
|
App.injectTestHelpers();
|
|
});
|
|
|
|
return App;
|
|
}
|