Ghost/ghost/admin/tests/helpers/destroy-app.js
Kevin Ansfield 0a37a27568 add manual pretender shutdown to fix acceptance tests (#342)
no issue
- a [recent update](https://github.com/pretenderjs/pretender/pull/178) to Pretender contained a breaking change that throws an error when multiple pretender instances exist
- using mirage in acceptance tests was [triggering the error](https://github.com/samselikoff/ember-cli-mirage/issues/915)
2017-01-05 08:36:50 -07:00

11 lines
239 B
JavaScript

import run from 'ember-runloop';
export default function destroyApp(application) {
// this is required to fix "second Pretender instance" warnings
if (server) {
server.shutdown();
}
run(application, 'destroy');
}