mol_wire_lib 1.0.280 → 1.0.283

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/node.test.js CHANGED
@@ -836,7 +836,7 @@ var $;
836
836
  }
837
837
  return true;
838
838
  }
839
- function compare_iterator(left, right, compare) {
839
+ function compare_iterator(left, right) {
840
840
  while (true) {
841
841
  const left_next = left.next();
842
842
  const right_next = right.next();
@@ -844,7 +844,7 @@ var $;
844
844
  return false;
845
845
  if (left_next.done)
846
846
  break;
847
- if (!compare(left_next.value, right_next.value))
847
+ if (!$mol_compare_deep(left_next.value, right_next.value))
848
848
  return false;
849
849
  }
850
850
  return true;
@@ -852,13 +852,13 @@ var $;
852
852
  function compare_set(left, right) {
853
853
  if (left.size !== right.size)
854
854
  return false;
855
- return compare_iterator(left.values(), right.values(), $mol_compare_deep);
855
+ return compare_iterator(left.values(), right.values());
856
856
  }
857
857
  function compare_map(left, right) {
858
858
  if (left.size !== right.size)
859
859
  return false;
860
- return compare_iterator(left.keys(), right.keys(), Object.is)
861
- && compare_iterator(left.values(), right.values(), $mol_compare_deep);
860
+ return compare_iterator(left.keys(), right.keys())
861
+ && compare_iterator(left.values(), right.values());
862
862
  }
863
863
  function compare_pojo(left, right) {
864
864
  const left_keys = Object.getOwnPropertyNames(left);
@@ -2679,8 +2679,9 @@ var $;
2679
2679
  'Map'() {
2680
2680
  $mol_assert_ok($mol_compare_deep(new Map, new Map));
2681
2681
  $mol_assert_ok($mol_compare_deep(new Map([[1, [2]]]), new Map([[1, [2]]])));
2682
+ $mol_assert_ok($mol_compare_deep(new Map([[[1], 2]]), new Map([[[1], 2]])));
2682
2683
  $mol_assert_not($mol_compare_deep(new Map([[1, 2]]), new Map([[1, 3]])));
2683
- $mol_assert_not($mol_compare_deep(new Map([[[1], 2]]), new Map([[[1], 2]])));
2684
+ $mol_assert_not($mol_compare_deep(new Map([[[1], 2]]), new Map([[[3], 2]])));
2684
2685
  },
2685
2686
  'Set'() {
2686
2687
  $mol_assert_ok($mol_compare_deep(new Set, new Set));