bugfix(assertAsync): add promiseLike support for angularJS promises
implement a promiseLike method so libraries using non-browser promise implementations can still utilize assertAsync functionality. Fixes: #1612
This commit is contained in:
@@ -19,7 +19,7 @@ getJasmineRequireObj().AsyncExpectation = function(j$) {
|
||||
throw new Error('expectAsync is unavailable because the environment does not support promises.');
|
||||
}
|
||||
|
||||
if (!j$.isPromise(this.actual)) {
|
||||
if (!j$.isPromiseLike(this.actual)) {
|
||||
throw new Error('Expected expectAsync to be called with a promise.');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user