@jest/expect-utils
Advanced tools
Comparing version 29.4.0 to 29.4.1
@@ -37,2 +37,13 @@ 'use strict'; | ||
}; | ||
// Retrieves an object's keys for evaluation by getObjectSubset. This evaluates | ||
// the prototype chain for string keys but not for symbols. (Otherwise, it | ||
// could find values such as a Set or Map's Symbol.toStringTag, with unexpected | ||
// results.) | ||
// | ||
// Compare with subsetEquality's use of Reflect.ownKeys. | ||
const getObjectKeys = object => [ | ||
...Object.keys(object), | ||
...Object.getOwnPropertySymbols(object) | ||
]; | ||
const getPath = (object, propertyPath) => { | ||
@@ -114,3 +125,3 @@ if (!Array.isArray(propertyPath)) { | ||
seenReferences.set(object, trimmed); | ||
Object.keys(object) | ||
getObjectKeys(object) | ||
.filter(key => hasPropertyInObject(subset, key)) | ||
@@ -127,3 +138,3 @@ .forEach(key => { | ||
}); | ||
if (Object.keys(trimmed).length > 0) { | ||
if (getObjectKeys(trimmed).length > 0) { | ||
return trimmed; | ||
@@ -130,0 +141,0 @@ } |
{ | ||
"name": "@jest/expect-utils", | ||
"version": "29.4.0", | ||
"version": "29.4.1", | ||
"repository": { | ||
@@ -25,3 +25,3 @@ "type": "git", | ||
"immutable": "^4.0.0", | ||
"jest-matcher-utils": "^29.4.0", | ||
"jest-matcher-utils": "^29.4.1", | ||
"tsd-lite": "^0.6.0" | ||
@@ -35,3 +35,3 @@ }, | ||
}, | ||
"gitHead": "4bc0e8acaf990e6618a7bed1dca67760c20bb12a" | ||
"gitHead": "bc84c8a15649aaaefdd624dc83824518c17467ed" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
56085
810