common/corpus-common-addon/tests/helpers/start-app.js
author ymh <ymh.work@gmail.com>
Thu, 10 Nov 2016 01:45:47 +0100
changeset 408 c89c11c2def7
parent 127 5cd8c3065c38
child 456 3a32d2f57429
permissions -rw-r--r--
temporarely hide the share button

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;
}