Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Commit

Permalink
Merge pull request #852 from atom/mb-allow-async-save-in-test
Browse files Browse the repository at this point in the history
Adjust test to work when TextBuffer.save is made async
  • Loading branch information
Max Brunsfeld committed May 20, 2017
2 parents 9506a5c + 99cebd9 commit 453d7c6
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions spec/autocomplete-manager-integration-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,14 @@ describe('Autocomplete Manager', () => {
editor.insertText('a')
waitForAutocomplete()

runs(() => {
waitsFor((done) => {
editor.getBuffer().onDidSave(() => {
expect(editorView.querySelector('.autocomplete-plus')).not.toExist()
done()
})

expect(editorView.querySelector('.autocomplete-plus')).toExist()
editor.saveAs(path.join(directory, 'spec', 'tmp', 'issue-11.js'))
expect(editorView.querySelector('.autocomplete-plus')).not.toExist()
})
})

Expand Down

0 comments on commit 453d7c6

Please sign in to comment.