@jest/expect-utils 29.4.3 → 29.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/utils.js +10 -1
- package/package.json +3 -3
package/build/utils.js
CHANGED
@@ -348,7 +348,16 @@ const subsetEquality = (object, subset, customTesters = []) => {
|
|
348
348
|
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
349
349
|
exports.subsetEquality = subsetEquality;
|
350
350
|
const typeEquality = (a, b) => {
|
351
|
-
if (
|
351
|
+
if (
|
352
|
+
a == null ||
|
353
|
+
b == null ||
|
354
|
+
a.constructor === b.constructor ||
|
355
|
+
// Since Jest globals are different from Node globals,
|
356
|
+
// constructors are different even between arrays when comparing properties of mock objects.
|
357
|
+
// Both of them should be able to compare correctly when they are array-to-array.
|
358
|
+
// https://github.com/facebook/jest/issues/2549
|
359
|
+
(Array.isArray(a) && Array.isArray(b))
|
360
|
+
) {
|
352
361
|
return undefined;
|
353
362
|
}
|
354
363
|
return false;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@jest/expect-utils",
|
3
|
-
"version": "29.
|
3
|
+
"version": "29.5.0",
|
4
4
|
"repository": {
|
5
5
|
"type": "git",
|
6
6
|
"url": "https://github.com/facebook/jest.git",
|
@@ -22,7 +22,7 @@
|
|
22
22
|
"devDependencies": {
|
23
23
|
"@tsd/typescript": "^4.9.0",
|
24
24
|
"immutable": "^4.0.0",
|
25
|
-
"jest-matcher-utils": "^29.
|
25
|
+
"jest-matcher-utils": "^29.5.0",
|
26
26
|
"tsd-lite": "^0.6.0"
|
27
27
|
},
|
28
28
|
"engines": {
|
@@ -31,5 +31,5 @@
|
|
31
31
|
"publishConfig": {
|
32
32
|
"access": "public"
|
33
33
|
},
|
34
|
-
"gitHead": "
|
34
|
+
"gitHead": "39f3beda6b396665bebffab94e8d7c45be30454c"
|
35
35
|
}
|