common/corpus-common-addon/tests/helpers/start-app.js
author ymh <ymh.work@gmail.com>
Mon, 14 Nov 2016 16:27:55 +0100
changeset 419 a37e8629a95c
parent 127 5cd8c3065c38
child 456 3a32d2f57429
permissions -rw-r--r--
Added tag 0.0.11 for changeset 6eb84397be15

import Ember from 'ember';
import Application from '../../app';
import config from '../../config/environment';

export default function startApp(attrs) {
  let application;

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

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

  return application;
}