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 #193 from atom/mb-wait-for-async-save
Browse files Browse the repository at this point in the history
Wait for save to complete in buffer modifier indicator test
  • Loading branch information
Max Brunsfeld authored May 23, 2017
2 parents a65b16e + e85eade commit f79ad9e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion spec/built-in-tiles-spec.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,12 @@ describe "Built-in Status Bar Tiles", ->
editor.insertText("\n")
advanceClock(buffer.stoppedChangingDelay)
expect(fileInfo.classList.contains('buffer-modified')).toBe(true)
editor.getBuffer().save()

waitsForPromise ->
# TODO - remove this Promise.resolve once atom/atom#14435 lands.
Promise.resolve(editor.getBuffer().save())

runs ->
expect(fileInfo.classList.contains('buffer-modified')).toBe(false)

it "disables the buffer modified indicator if the content matches again", ->
Expand Down

0 comments on commit f79ad9e

Please sign in to comment.