Built distribution
This commit is contained in:
@@ -445,7 +445,7 @@ getJasmineRequireObj().base = function(j$, jasmineGlobal) {
|
|||||||
* that will succeed if every key/value pair in the sample passes the deep equality comparison
|
* that will succeed if every key/value pair in the sample passes the deep equality comparison
|
||||||
* with at least one key/value pair in the actual value being compared
|
* with at least one key/value pair in the actual value being compared
|
||||||
* @name jasmine.mapContaining
|
* @name jasmine.mapContaining
|
||||||
* @since
|
* @since 3.5.0
|
||||||
* @function
|
* @function
|
||||||
* @param {Map} sample - The subset of items that _must_ be in the actual.
|
* @param {Map} sample - The subset of items that _must_ be in the actual.
|
||||||
*/
|
*/
|
||||||
@@ -457,8 +457,8 @@ getJasmineRequireObj().base = function(j$, jasmineGlobal) {
|
|||||||
* 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}),
|
* 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 every item in the sample passes the deep equality comparison
|
* that will succeed if every item in the sample passes the deep equality comparison
|
||||||
* with at least one item in the actual value being compared
|
* with at least one item in the actual value being compared
|
||||||
* @name jasmine.mapContaining
|
* @name jasmine.setContaining
|
||||||
* @since
|
* @since 3.5.0
|
||||||
* @function
|
* @function
|
||||||
* @param {Set} sample - The subset of items that _must_ be in the actual.
|
* @param {Set} sample - The subset of items that _must_ be in the actual.
|
||||||
*/
|
*/
|
||||||
@@ -3939,7 +3939,7 @@ getJasmineRequireObj().toBeRejectedWithError = function(j$) {
|
|||||||
function getExpectedFromArgs(arg1, arg2) {
|
function getExpectedFromArgs(arg1, arg2) {
|
||||||
var error, message;
|
var error, message;
|
||||||
|
|
||||||
if (typeof arg1 === 'function' && j$.isError_(arg1.prototype)) {
|
if (isErrorConstructor(arg1)) {
|
||||||
error = arg1;
|
error = arg1;
|
||||||
message = arg2;
|
message = arg2;
|
||||||
} else {
|
} else {
|
||||||
@@ -3953,6 +3953,10 @@ getJasmineRequireObj().toBeRejectedWithError = function(j$) {
|
|||||||
printValue: j$.fnNameFor(error) + (typeof message === 'undefined' ? '' : ': ' + j$.pp(message))
|
printValue: j$.fnNameFor(error) + (typeof message === 'undefined' ? '' : ': ' + j$.pp(message))
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function isErrorConstructor(value) {
|
||||||
|
return typeof value === 'function' && (value === Error || j$.isError_(value.prototype));
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
getJasmineRequireObj().toBeResolved = function(j$) {
|
getJasmineRequireObj().toBeResolved = function(j$) {
|
||||||
@@ -4011,24 +4015,24 @@ getJasmineRequireObj().toBeResolvedTo = function(j$) {
|
|||||||
|
|
||||||
return actualPromise.then(
|
return actualPromise.then(
|
||||||
function(actualValue) {
|
function(actualValue) {
|
||||||
if (util.equals(actualValue, expectedValue, customEqualityTesters)) {
|
if (util.equals(actualValue, expectedValue, customEqualityTesters)) {
|
||||||
return {
|
return {
|
||||||
pass: true,
|
pass: true,
|
||||||
message: prefix(true) + '.'
|
message: prefix(true) + '.'
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
|
return {
|
||||||
|
pass: false,
|
||||||
|
message: prefix(false) + ' but it was resolved to ' + j$.pp(actualValue) + '.'
|
||||||
|
};
|
||||||
|
}
|
||||||
|
},
|
||||||
|
function() {
|
||||||
return {
|
return {
|
||||||
pass: false,
|
pass: false,
|
||||||
message: prefix(false) + ' but it was resolved to ' + j$.pp(actualValue) + '.'
|
message: prefix(false) + ' but it was rejected.'
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
},
|
|
||||||
function() {
|
|
||||||
return {
|
|
||||||
pass: false,
|
|
||||||
message: prefix(false) + ' but it was rejected.'
|
|
||||||
};
|
|
||||||
}
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user