diff --git a/spec/git-repository-async-spec.js b/spec/git-repository-async-spec.js index 17c3a4eb2..e1b48da4c 100644 --- a/spec/git-repository-async-spec.js +++ b/spec/git-repository-async-spec.js @@ -234,7 +234,7 @@ describe('GitRepositoryAsync', () => { let filePath let editor - beforeEach(() => { + beforeEach(async () => { spyOn(atom, 'confirm') const workingDirPath = copyRepository() @@ -242,12 +242,7 @@ describe('GitRepositoryAsync', () => { filePath = path.join(workingDirPath, 'a.txt') fs.writeFileSync(filePath, 'ch ch changes') - waitsForPromise(() => atom.workspace.open(filePath)) - runs(() => editor = atom.workspace.getActiveTextEditor()) - }) - - afterEach(() => { - editor = null + editor = await atom.workspace.open(filePath) }) it('displays a confirmation dialog by default', async () => {