mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-18 22:12:14 +00:00
Add ember to project
This commit is contained in:
24
tests/helpers/module-for-acceptance.js
Normal file
24
tests/helpers/module-for-acceptance.js
Normal 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)
|
||||
)
|
||||
};
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user