mirror of
https://github.com/atom/atom.git
synced 2026-01-24 14:28:14 -05:00
waitsForPromise can wait for calls to fail
This commit is contained in:
@@ -90,7 +90,8 @@ window.mousemoveEvent = (properties={}) ->
|
||||
|
||||
window.waitsForPromise = (fn) ->
|
||||
window.waitsFor (moveOn) ->
|
||||
fn().done(moveOn)
|
||||
promise = fn()
|
||||
promise.then promise.done(moveOn), promise.fail(moveOn)
|
||||
|
||||
window.resetTimeouts = ->
|
||||
window.now = 0
|
||||
|
||||
Reference in New Issue
Block a user