Update checked-in dependencies
This commit is contained in:
parent
3ba511a8f1
commit
1c4c64199f
175 changed files with 13227 additions and 15136 deletions
14
node_modules/@sinonjs/samsam/lib/deep-equal.js
generated
vendored
14
node_modules/@sinonjs/samsam/lib/deep-equal.js
generated
vendored
|
|
@ -117,6 +117,10 @@ function deepEqualCyclic(actual, expectation, match) {
|
|||
}
|
||||
}
|
||||
|
||||
if (actualObj instanceof Promise && expectationObj instanceof Promise) {
|
||||
return actualObj === expectationObj;
|
||||
}
|
||||
|
||||
if (actualObj instanceof Error && expectationObj instanceof Error) {
|
||||
return actualObj === expectationObj;
|
||||
}
|
||||
|
|
@ -176,7 +180,7 @@ function deepEqualCyclic(actual, expectation, match) {
|
|||
}
|
||||
|
||||
var mapsDeeplyEqual = true;
|
||||
mapForEach(actualObj, function(value, key) {
|
||||
mapForEach(actualObj, function (value, key) {
|
||||
mapsDeeplyEqual =
|
||||
mapsDeeplyEqual &&
|
||||
deepEqualCyclic(value, expectationObj.get(key));
|
||||
|
|
@ -185,7 +189,7 @@ function deepEqualCyclic(actual, expectation, match) {
|
|||
return mapsDeeplyEqual;
|
||||
}
|
||||
|
||||
return every(expectationKeysAndSymbols, function(key) {
|
||||
return every(expectationKeysAndSymbols, function (key) {
|
||||
if (!hasOwnProperty(actualObj, key)) {
|
||||
return false;
|
||||
}
|
||||
|
|
@ -210,11 +214,11 @@ function deepEqualCyclic(actual, expectation, match) {
|
|||
var newActualPath =
|
||||
actualIndex !== -1
|
||||
? actualPaths[actualIndex]
|
||||
: actualPath + "[" + JSON.stringify(key) + "]";
|
||||
: `${actualPath}[${JSON.stringify(key)}]`;
|
||||
var newExpectationPath =
|
||||
expectationIndex !== -1
|
||||
? expectationPaths[expectationIndex]
|
||||
: expectationPath + "[" + JSON.stringify(key) + "]";
|
||||
: `${expectationPath}[${JSON.stringify(key)}]`;
|
||||
var combinedPath = newActualPath + newExpectationPath;
|
||||
|
||||
// stop recursion if current objects are already compared
|
||||
|
|
@ -251,7 +255,7 @@ function deepEqualCyclic(actual, expectation, match) {
|
|||
})(actual, expectation, "$1", "$2");
|
||||
}
|
||||
|
||||
deepEqualCyclic.use = function(match) {
|
||||
deepEqualCyclic.use = function (match) {
|
||||
return function deepEqual(a, b) {
|
||||
return deepEqualCyclic(a, b, match);
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue