This repository has been archived on 2025-03-30. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
hymenobacterdotinfo/tests/helpers/module-for-acceptance.js
2015-11-12 06:36:22 -07:00

23 lines
504 B
JavaScript

import { module } from 'qunit';
import startApp from '../helpers/start-app';
import destroyApp from '../helpers/destroy-app';
export default function(name, options = {}) {
module(name, {
beforeEach() {
this.application = startApp();
if (options.beforeEach) {
options.beforeEach.apply(this, arguments);
}
},
afterEach() {
destroyApp(this.application);
if (options.afterEach) {
options.afterEach.apply(this, arguments);
}
}
});
}