@jest/expect-utils 28.0.0 → 28.1.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/jasmineUtils.js +7 -1
- package/build/utils.js +6 -4
- package/package.json +6 -5
package/build/jasmineUtils.js
CHANGED
@@ -5,6 +5,7 @@ Object.defineProperty(exports, '__esModule', {
|
|
5
5
|
});
|
6
6
|
exports.equals = void 0;
|
7
7
|
exports.isA = isA;
|
8
|
+
exports.isImmutableList = isImmutableList;
|
8
9
|
exports.isImmutableUnorderedKeyed = isImmutableUnorderedKeyed;
|
9
10
|
exports.isImmutableUnorderedSet = isImmutableUnorderedSet;
|
10
11
|
|
@@ -235,10 +236,11 @@ function isDomNode(obj) {
|
|
235
236
|
typeof obj.nodeName === 'string' &&
|
236
237
|
typeof obj.isEqualNode === 'function'
|
237
238
|
);
|
238
|
-
} // SENTINEL constants are from https://github.com/
|
239
|
+
} // SENTINEL constants are from https://github.com/immutable-js/immutable-js/tree/main/src/predicates
|
239
240
|
|
240
241
|
const IS_KEYED_SENTINEL = '@@__IMMUTABLE_KEYED__@@';
|
241
242
|
const IS_SET_SENTINEL = '@@__IMMUTABLE_SET__@@';
|
243
|
+
const IS_LIST_SENTINEL = '@@__IMMUTABLE_LIST__@@';
|
242
244
|
const IS_ORDERED_SENTINEL = '@@__IMMUTABLE_ORDERED__@@';
|
243
245
|
|
244
246
|
function isImmutableUnorderedKeyed(maybeKeyed) {
|
@@ -256,3 +258,7 @@ function isImmutableUnorderedSet(maybeSet) {
|
|
256
258
|
!maybeSet[IS_ORDERED_SENTINEL]
|
257
259
|
);
|
258
260
|
}
|
261
|
+
|
262
|
+
function isImmutableList(maybeList) {
|
263
|
+
return !!(maybeList && maybeList[IS_LIST_SENTINEL]);
|
264
|
+
}
|
package/build/utils.js
CHANGED
@@ -278,11 +278,13 @@ const iterableEquality = (
|
|
278
278
|
return false;
|
279
279
|
}
|
280
280
|
|
281
|
-
|
282
|
-
|
281
|
+
if (!(0, _jasmineUtils.isImmutableList)(a)) {
|
282
|
+
const aEntries = Object.entries(a);
|
283
|
+
const bEntries = Object.entries(b);
|
283
284
|
|
284
|
-
|
285
|
-
|
285
|
+
if (!(0, _jasmineUtils.equals)(aEntries, bEntries)) {
|
286
|
+
return false;
|
287
|
+
}
|
286
288
|
} // Remove the first value from the stack of traversed values.
|
287
289
|
|
288
290
|
aStack.pop();
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@jest/expect-utils",
|
3
|
-
"version": "28.
|
3
|
+
"version": "28.1.0",
|
4
4
|
"repository": {
|
5
5
|
"type": "git",
|
6
6
|
"url": "https://github.com/facebook/jest.git",
|
@@ -17,16 +17,17 @@
|
|
17
17
|
"./package.json": "./package.json"
|
18
18
|
},
|
19
19
|
"dependencies": {
|
20
|
-
"jest-get-type": "^28.0.
|
20
|
+
"jest-get-type": "^28.0.2"
|
21
21
|
},
|
22
22
|
"devDependencies": {
|
23
|
-
"
|
23
|
+
"immutable": "^4.0.0",
|
24
|
+
"jest-matcher-utils": "^28.1.0"
|
24
25
|
},
|
25
26
|
"engines": {
|
26
|
-
"node": "^12.13.0 || ^14.15.0 || ^16.
|
27
|
+
"node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0"
|
27
28
|
},
|
28
29
|
"publishConfig": {
|
29
30
|
"access": "public"
|
30
31
|
},
|
31
|
-
"gitHead": "
|
32
|
+
"gitHead": "f5db241312f46528389e55c38221e6b6968622cf"
|
32
33
|
}
|