@jest/expect-utils 28.0.0-alpha.4 → 28.0.0-alpha.5

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/index.d.ts CHANGED
@@ -35,6 +35,7 @@ export declare const getObjectSubset: (
35
35
  */
36
36
  declare type GetPath = {
37
37
  hasEndProp?: boolean;
38
+ endPropIsDefined?: boolean;
38
39
  lastTraversedObject: unknown;
39
40
  traversedPath: Array<string>;
40
41
  value?: unknown;
package/build/utils.js CHANGED
@@ -73,9 +73,9 @@ const getPath = (object, propertyPath) => {
73
73
  // Does object have the property with an undefined value?
74
74
  // Although primitive values support bracket notation (above)
75
75
  // they would throw TypeError for in operator (below).
76
- result.hasEndProp =
77
- newObject !== undefined ||
78
- (!(0, _jestGetType.isPrimitive)(object) && prop in object);
76
+ result.endPropIsDefined =
77
+ !(0, _jestGetType.isPrimitive)(object) && prop in object;
78
+ result.hasEndProp = newObject !== undefined || result.endPropIsDefined;
79
79
 
80
80
  if (!result.hasEndProp) {
81
81
  result.traversedPath.shift();
@@ -276,6 +276,13 @@ const iterableEquality = (
276
276
 
277
277
  if (!bIterator.next().done) {
278
278
  return false;
279
+ }
280
+
281
+ const aEntries = Object.entries(a);
282
+ const bEntries = Object.entries(b);
283
+
284
+ if (!(0, _jasmineUtils.equals)(aEntries, bEntries)) {
285
+ return false;
279
286
  } // Remove the first value from the stack of traversed values.
280
287
 
281
288
  aStack.pop();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jest/expect-utils",
3
- "version": "28.0.0-alpha.4",
3
+ "version": "28.0.0-alpha.5",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/facebook/jest.git",
@@ -20,7 +20,7 @@
20
20
  "jest-get-type": "^28.0.0-alpha.3"
21
21
  },
22
22
  "devDependencies": {
23
- "jest-matcher-utils": "^28.0.0-alpha.4"
23
+ "jest-matcher-utils": "^28.0.0-alpha.5"
24
24
  },
25
25
  "engines": {
26
26
  "node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0"
@@ -28,5 +28,5 @@
28
28
  "publishConfig": {
29
29
  "access": "public"
30
30
  },
31
- "gitHead": "c13dab19491ba6b57c2d703e7d7c4b20189e1e17"
31
+ "gitHead": "46fb19b2628bd87676c10730ba19592c30b05478"
32
32
  }