Move package reset down into PackageManager

This commit is contained in:
Antonio Scandurra 2015-10-09 10:04:04 +02:00
parent 4863b71fd7
commit 60e4b78da3
3 changed files with 8 additions and 6 deletions

View File

@ -91,8 +91,6 @@ beforeEach ->
spyOn(window, "setTimeout").andCallFake window.fakeSetTimeout
spyOn(window, "clearTimeout").andCallFake window.fakeClearTimeout
atom.packages.packageStates = {}
serializedWindowState = null
spyOn(atom, 'saveStateSync')
@ -141,14 +139,11 @@ beforeEach ->
addCustomMatchers(this)
afterEach ->
atom.packages.deactivatePackages()
atom.workspace?.destroy()
atom.workspace = null
atom.themes.workspace = null
delete atom.state.workspace
delete atom.state.packageStates
atom.reset()
document.getElementById('jasmine-content').innerHTML = '' unless window.debugContent

View File

@ -253,10 +253,12 @@ class AtomEnvironment extends Model
@contextMenu.clear()
@packages.serviceHub.clear()
@packages.reset()
@project.reset(@packages)
@state.packageStates = {}
destroy: ->
return if not @project

View File

@ -52,6 +52,11 @@ class PackageManager
setThemeManager: (@themeManager) ->
reset: ->
@serviceHub.clear()
@deactivatePackages()
@packageStates = {}
###
Section: Event Subscription
###