Ghost/ghost/admin/tests/helpers/destroy-app.js

16 lines
417 B
JavaScript
Raw Normal View History

/* global key */
import {run} from '@ember/runloop';
2015-11-30 20:21:39 +03:00
export default function destroyApp(application) {
// this is required to fix "second Pretender instance" warnings
if (server) {
server.shutdown();
}
// extra check to ensure we don't have references hanging around via key
// bindings on supposedly destroyed objects
key.deleteScope('default');
run(application, 'destroy');
2015-11-30 20:21:39 +03:00
}