mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-23 08:22:15 +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 {module} from "qunit";
|
||||||
import Ember from 'ember';
|
import Ember from "ember";
|
||||||
import startApp from '../helpers/start-app';
|
import startApp from "../helpers/start-app";
|
||||||
import destroyApp from '../helpers/destroy-app';
|
import destroyApp from "../helpers/destroy-app";
|
||||||
|
|
||||||
const {RSVP: {Promise}} = Ember;
|
const {RSVP: {Promise}} = Ember;
|
||||||
|
|
||||||
@@ -18,7 +18,7 @@ export default function (name, options = {}) {
|
|||||||
afterEach() {
|
afterEach() {
|
||||||
let afterEach = options.afterEach && options.afterEach.apply(this, arguments);
|
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 Ember from "ember";
|
||||||
import Application from '../../app';
|
import Application from "../../app";
|
||||||
import config from '../../config/environment';
|
import config from "../../config/environment";
|
||||||
|
|
||||||
export default function startApp(attrs) {
|
export default function startApp(attrs) {
|
||||||
let application;
|
let application;
|
||||||
@@ -12,6 +12,6 @@ export default function startApp(attrs) {
|
|||||||
application = Application.create(attributes);
|
application = Application.create(attributes);
|
||||||
application.setupForTesting();
|
application.setupForTesting();
|
||||||
application.injectTestHelpers();
|
application.injectTestHelpers();
|
||||||
})
|
});
|
||||||
return application;
|
return application;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user