diff -r ded3cf22eef8 -r 76ae75975ee2 server/bo_client/tests/helpers/module-for-acceptance.js --- a/server/bo_client/tests/helpers/module-for-acceptance.js Sun Apr 24 22:38:10 2016 +0200 +++ b/server/bo_client/tests/helpers/module-for-acceptance.js Mon Apr 25 12:53:47 2016 +0200 @@ -1,23 +1,23 @@ 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) { - options.beforeEach.apply(this, arguments); + return options.beforeEach.apply(this, arguments); } }, afterEach() { - if (options.afterEach) { - options.afterEach.apply(this, arguments); - } - - destroyApp(this.application); + let afterEach = options.afterEach && options.afterEach.apply(this, arguments); + return Promise.resolve(afterEach).then(() => destroyApp(this.application)); } }); }