Skip to content

Commit

Permalink
Try to fix flaky spec
Browse files Browse the repository at this point in the history
  • Loading branch information
Nathan Sobo committed May 16, 2014
1 parent 10e609b commit 3f1ce61
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions spec/atom-spec.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -510,22 +510,20 @@ describe "the `atom` global", ->
# enabling of theme
pack = atom.packages.enablePackage(packageName)

waitsFor (done) ->
atom.themes.once 'reloaded', done
waitsFor ->
pack in atom.packages.getActivePackages()

runs ->
expect(atom.packages.getActivePackages()).toContain pack
expect(atom.config.get('core.themes')).toContain packageName
expect(atom.config.get('core.disabledPackages')).not.toContain packageName

# disabling of theme
pack = atom.packages.disablePackage(packageName)

waitsFor (done) ->
atom.themes.once 'reloaded', done
waitsFor ->
not (pack in atom.packages.getActivePackages())

runs ->
expect(atom.packages.getActivePackages()).not.toContain(pack)
expect(atom.config.get('core.themes')).not.toContain packageName
expect(atom.config.get('core.themes')).not.toContain packageName
expect(atom.config.get('core.disabledPackages')).not.toContain packageName
Expand Down

0 comments on commit 3f1ce61

Please sign in to comment.