mirror of
https://github.com/atom/atom.git
synced 2026-01-23 05:48:10 -05:00
Remove logic for different promise types in waitsForPromise
I added that logic when using the selenium-webdriver library, but then switched to using webdriverio, which has the same Promise interface as Q.
This commit is contained in:
@@ -305,13 +305,13 @@ window.waitsForPromise = (args...) ->
|
||||
window.waitsFor timeout, (moveOn) ->
|
||||
promise = fn()
|
||||
if shouldReject
|
||||
(promise.catch ? promise.thenCatch).call(promise, moveOn)
|
||||
promise.catch.call(promise, moveOn)
|
||||
promise.then ->
|
||||
jasmine.getEnv().currentSpec.fail("Expected promise to be rejected, but it was resolved")
|
||||
moveOn()
|
||||
else
|
||||
promise.then(moveOn)
|
||||
(promise.catch ? promise.thenCatch).call promise, (error) ->
|
||||
promise.catch.call promise, (error) ->
|
||||
jasmine.getEnv().currentSpec.fail("Expected promise to be resolved, but it was rejected with #{jasmine.pp(error)}")
|
||||
moveOn()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user