Merge branch '3.99' into 4.0
This commit is contained in:
@@ -201,6 +201,19 @@ getJasmineRequireObj().base = function(j$, jasmineGlobal) {
|
||||
return matches ? matches[1] : '<anonymous>';
|
||||
};
|
||||
|
||||
j$.isPending_ = function(promise) {
|
||||
var sentinel = {};
|
||||
// eslint-disable-next-line compat/compat
|
||||
return Promise.race([promise, Promise.resolve(sentinel)]).then(
|
||||
function(result) {
|
||||
return result === sentinel;
|
||||
},
|
||||
function() {
|
||||
return false;
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
/**
|
||||
* Get a matcher, usable in any {@link matchers|matcher} that uses Jasmine's equality (e.g. {@link matchers#toEqual|toEqual}, {@link matchers#toContain|toContain}, or {@link matchers#toHaveBeenCalledWith|toHaveBeenCalledWith}),
|
||||
* that will succeed if the actual value being compared is an instance of the specified class/constructor.
|
||||
|
||||
Reference in New Issue
Block a user