Fix specs to deal w/ async ServiceHub::consume

This commit is contained in:
Max Brunsfeld 2015-07-23 11:31:09 -07:00
parent efe0fbe0ea
commit d9aa95fb11
2 changed files with 3 additions and 2 deletions

View File

@ -106,8 +106,8 @@ describe "Project", ->
atom.packages.serviceHub.provide(
"atom.repository-provider", "0.1.0", repositoryProvider)
expect(atom.project.repositoryProviders.length).toBe 2
expect(atom.project.getRepositories()).toEqual [dummyRepository]
waitsFor -> atom.project.repositoryProviders.length is 2
runs -> expect(atom.project.getRepositories()).toEqual [dummyRepository]
it "does not update @repositories if every path has a Repository", ->
repositories = atom.project.getRepositories()

View File

@ -15,6 +15,7 @@ describe "Workspace", ->
beforeEach ->
atom.project.setPaths([atom.project.getDirectories()[0]?.resolve('dir')])
atom.workspace = workspace = new Workspace
waits(1)
describe "::open(uri, options)", ->
openEvents = null