2018-03-19 21:39:17 +03:00
|
|
|
/* global key */
|
2017-08-22 10:53:26 +03:00
|
|
|
import {run} from '@ember/runloop';
|
2016-06-11 19:52:36 +03:00
|
|
|
|
2015-11-30 20:21:39 +03:00
|
|
|
export default function destroyApp(application) {
|
2017-01-05 18:36:50 +03:00
|
|
|
// this is required to fix "second Pretender instance" warnings
|
|
|
|
if (server) {
|
|
|
|
server.shutdown();
|
|
|
|
}
|
|
|
|
|
2018-03-19 21:39:17 +03:00
|
|
|
// extra check to ensure we don't have references hanging around via key
|
|
|
|
// bindings on supposedly destroyed objects
|
|
|
|
key.deleteScope('default');
|
|
|
|
|
2016-06-11 19:52:36 +03:00
|
|
|
run(application, 'destroy');
|
2015-11-30 20:21:39 +03:00
|
|
|
}
|