@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.
@@ -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/facebook/immutable-js
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
- const aEntries = Object.entries(a);
282
- const bEntries = Object.entries(b);
281
+ if (!(0, _jasmineUtils.isImmutableList)(a)) {
282
+ const aEntries = Object.entries(a);
283
+ const bEntries = Object.entries(b);
283
284
 
284
- if (!(0, _jasmineUtils.equals)(aEntries, bEntries)) {
285
- return false;
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.0.0",
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.0"
20
+ "jest-get-type": "^28.0.2"
21
21
  },
22
22
  "devDependencies": {
23
- "jest-matcher-utils": "^28.0.0"
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.13.0 || >=17.0.0"
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": "8f9b812faf8e4d241d560a8574f0c6ed20a89365"
32
+ "gitHead": "f5db241312f46528389e55c38221e6b6968622cf"
32
33
  }