Add ember to project

This commit is contained in:
Tom Price
2016-08-09 13:18:19 +01:00
parent 024f08562b
commit bfdf0cabbe
139 changed files with 454 additions and 1 deletions

View File

@@ -0,0 +1,24 @@
import {module} from 'qunit';
import Ember from 'ember';
import startApp from '../helpers/start-app';
import destroyApp from '../helpers/destroy-app';
const {RSVP: {Promise}} = Ember;
export default function (name, options = {}) {
module(name, {
beforeEach() {
this.application = startApp();
if (options.beforeEach) {
return options.beforeEach.apply(this, arguments);
}
},
afterEach() {
let afterEach = options.afterEach && options.afterEach.apply(this, arguments);
return Promise.resolve(afterEach).then(() = > destroyApp(this.application)
)
};
});
}