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

Adjust test to work when TextBuffer.save is made async #852

Merged
merged 1 commit into from
May 20, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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