mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-14 18:52:05 +03:00
24 lines
577 B
JavaScript
24 lines
577 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);
|
|
}
|
|
}
|
|
});
|
|
}
|