mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
Use the promise from refreshStatus to know when we're done.
This commit is contained in:
@@ -404,7 +404,7 @@ describe('GitRepositoryAsync', () => {
|
||||
// need to wait for that to complete before the tests continue so that
|
||||
// we're in a known state.
|
||||
repo = atom.project.getRepositories()[0].async
|
||||
waitsFor(() => !repo._isRefreshing())
|
||||
waitsForPromise(() => repo.refreshStatus())
|
||||
})
|
||||
|
||||
it('emits a status-changed event when a buffer is saved', async () => {
|
||||
@@ -480,7 +480,7 @@ describe('GitRepositoryAsync', () => {
|
||||
// See the comment in the 'buffer events' beforeEach for why we need to do
|
||||
// this.
|
||||
const repository = atom.project.getRepositories()[0].async
|
||||
waitsFor(() => !repository._isRefreshing())
|
||||
waitsForPromise(() => repository.refreshStatus())
|
||||
})
|
||||
|
||||
afterEach(() => {
|
||||
@@ -494,7 +494,7 @@ describe('GitRepositoryAsync', () => {
|
||||
project2.deserialize(atom.project.serialize(), atom.deserializers)
|
||||
|
||||
const repo = project2.getRepositories()[0].async
|
||||
waitsFor(() => !repo._isRefreshing())
|
||||
waitsForPromise(() => repo.refreshStatus())
|
||||
runs(() => {
|
||||
const buffer = project2.getBuffers()[0]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user