summaryrefslogtreecommitdiffstats
path: root/third_party/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs/tests/helpers/start-app.js
blob: dd5f6a6361af7edbc4884d308d42be890feb9749 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import Ember from 'ember';
import Application from '../../app';
import config from '../../config/environment';

export default function startApp(attrs) {
    let application;

    // use defaults, but you can override
    let attributes = Ember.assign({}, config.APP, attrs);

    Ember.run(() => {
        application = Application.create(attributes);
        application.setupForTesting();
        application.injectTestHelpers();
    });

    return application;
}