mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-17 05:22:16 +00:00
Fix a few ember init fails.
Turns out ember, although defaulting to ECMAScript 6, can't actually write ES6...
This commit is contained in:
@@ -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)
|
||||
);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user