From 8e679b38858c8f85373370bf40a7e4e4a5ff5d32 Mon Sep 17 00:00:00 2001 From: Tom Price Date: Tue, 9 Aug 2016 13:34:27 +0100 Subject: [PATCH] Fix a few ember init fails. Turns out ember, although defaulting to ECMAScript 6, can't actually write ES6... --- tests/helpers/module-for-acceptance.js | 14 +++++++------- tests/helpers/start-app.js | 10 +++++----- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/tests/helpers/module-for-acceptance.js b/tests/helpers/module-for-acceptance.js index 74a1b806..bd0854ad 100644 --- a/tests/helpers/module-for-acceptance.js +++ b/tests/helpers/module-for-acceptance.js @@ -1,7 +1,7 @@ -import {module} from 'qunit'; -import Ember from 'ember'; -import startApp from '../helpers/start-app'; -import destroyApp from '../helpers/destroy-app'; +import {module} from "qunit"; +import Ember from "ember"; +import startApp from "../helpers/start-app"; +import destroyApp from "../helpers/destroy-app"; const {RSVP: {Promise}} = Ember; @@ -17,8 +17,8 @@ export default function (name, options = {}) { afterEach() { let afterEach = options.afterEach && options.afterEach.apply(this, arguments); - return Promise.resolve(afterEach).then(() = > destroyApp(this.application) - ) - }; + return Promise.resolve(afterEach).then(() => destroyApp(this.application) + ); + } }); } diff --git a/tests/helpers/start-app.js b/tests/helpers/start-app.js index d4f72739..1227be49 100644 --- a/tests/helpers/start-app.js +++ b/tests/helpers/start-app.js @@ -1,6 +1,6 @@ -import Ember from 'ember'; -import Application from '../../app'; -import config from '../../config/environment'; +import Ember from "ember"; +import Application from "../../app"; +import config from "../../config/environment"; export default function startApp(attrs) { let application; @@ -8,10 +8,10 @@ export default function startApp(attrs) { let attributes = Ember.merge({}, config.APP); attributes = Ember.merge(attributes, attrs); // use defaults, but you can override; - Ember.run(() = > { + Ember.run(() => { application = Application.create(attributes); application.setupForTesting(); application.injectTestHelpers(); -}) + }); return application; }