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

Commit f79ad9e

Browse files
author
Max Brunsfeld
authored
Merge pull request #193 from atom/mb-wait-for-async-save
Wait for save to complete in buffer modifier indicator test
2 parents a65b16e + e85eade commit f79ad9e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

spec/built-in-tiles-spec.coffee

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,12 @@ describe "Built-in Status Bar Tiles", ->
174174
editor.insertText("\n")
175175
advanceClock(buffer.stoppedChangingDelay)
176176
expect(fileInfo.classList.contains('buffer-modified')).toBe(true)
177-
editor.getBuffer().save()
177+
178+
waitsForPromise ->
179+
# TODO - remove this Promise.resolve once atom/atom#14435 lands.
180+
Promise.resolve(editor.getBuffer().save())
181+
182+
runs ->
178183
expect(fileInfo.classList.contains('buffer-modified')).toBe(false)
179184

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

0 commit comments

Comments
 (0)