Fix another two tests

This commit is contained in:
Damien Guard 2017-09-06 15:28:58 -07:00
parent af66c5efaa
commit 468f4a47a9
No known key found for this signature in database
GPG Key ID: DC14FA2FB1465DB6
2 changed files with 19 additions and 20 deletions

View File

@ -1375,6 +1375,7 @@ describe "PackageManager", ->
atom.themes.activateThemes() atom.themes.activateThemes()
afterEach -> afterEach ->
waitsForPromise ->
atom.themes.deactivateThemes() atom.themes.deactivateThemes()
it "enables and disables a theme", -> it "enables and disables a theme", ->

View File

@ -262,10 +262,8 @@ class ThemeManager
new Promise (resolve) => new Promise (resolve) =>
# @config.observe runs the callback once, then on subsequent changes. # @config.observe runs the callback once, then on subsequent changes.
@config.observe 'core.themes', => @config.observe 'core.themes', =>
@deactivateThemes() @deactivateThemes().then =>
@warnForNonExistentThemes() @warnForNonExistentThemes()
@refreshLessCache() # Update cache for packages in core.themes config @refreshLessCache() # Update cache for packages in core.themes config
promises = [] promises = []