Destroy rootView/project on both window and atom globals

This commit is contained in:
Kevin Sawicki
2013-10-02 15:50:47 -07:00
parent 3d5f1c6c90
commit 80cfcb799e

View File

@@ -82,12 +82,17 @@ afterEach ->
keymap.bindingSets = bindingSetsToRestore
keymap.bindingSetsByFirstKeystroke = bindingSetsByFirstKeystrokeToRestore
atom.deactivatePackages()
if rootView?
rootView.remove?()
window.rootView = null
if project?
project.destroy()
window.project = null
window.rootView?.remove?()
atom.rootView?.remove?() if atom.rootView isnt window.rootView
window.rootView = null
atom.rootView = null
window.project?.destroy?()
atom.project?.destroy?() if atom.project isnt window.project
window.project = null
atom.project = null
$('#jasmine-content').empty() unless window.debugContent
delete atom.windowState
jasmine.unspy(atom, 'saveWindowState')