diff -r 66c1d31e2f97 -r 5fed7e1716c2 server/bo_client/tests/helpers/module-for-acceptance.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/server/bo_client/tests/helpers/module-for-acceptance.js Wed Mar 02 13:47:07 2016 +0100 @@ -0,0 +1,23 @@ +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() { + if (options.afterEach) { + options.afterEach.apply(this, arguments); + } + + destroyApp(this.application); + } + }); +}