cms/app-client/tests/helpers/start-app.js
author Chloe Laisne <chloe.laisne@gmail.com>
Sun, 16 Oct 2016 22:23:31 +0530
changeset 338 4a3899b6a7ed
parent 136 5fed7e1716c2
child 456 3a32d2f57429
permissions -rw-r--r--
Fix notice/transcript display when adding filter from notice, switching from playlist, toolbar, and player

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