hyoo_sync_client 0.0.50 → 0.0.51

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
@@ -2066,6 +2066,8 @@ var $;
2066
2066
  result = compare_map(left, right);
2067
2067
  else if (ArrayBuffer.isView(left))
2068
2068
  result = compare_buffer(left, right);
2069
+ else if (Symbol.iterator in left)
2070
+ result = compare_iterator(left[Symbol.iterator](), right[Symbol.iterator]());
2069
2071
  else if (Symbol.toPrimitive in left)
2070
2072
  result = compare_primitive(left, right);
2071
2073
  else
@@ -4920,7 +4922,7 @@ var $;
4920
4922
  $mol_assert_ok($mol_compare_deep(new Uint8Array([0]), new Uint8Array([0])));
4921
4923
  $mol_assert_not($mol_compare_deep(new Uint8Array([0]), new Uint8Array([1])));
4922
4924
  },
4923
- 'Custom comparator'() {
4925
+ 'Serializale'() {
4924
4926
  class User {
4925
4927
  name;
4926
4928
  rand;
@@ -4935,6 +4937,11 @@ var $;
4935
4937
  $mol_assert_ok($mol_compare_deep(new User('Jin'), new User('Jin')));
4936
4938
  $mol_assert_not($mol_compare_deep(new User('Jin'), new User('John')));
4937
4939
  },
4940
+ 'Iterable'() {
4941
+ $mol_assert_ok($mol_compare_deep(new URLSearchParams({ foo: 'bar' }), new URLSearchParams({ foo: 'bar' })));
4942
+ $mol_assert_not($mol_compare_deep(new URLSearchParams({ foo: 'xxx' }), new URLSearchParams({ foo: 'yyy' })));
4943
+ $mol_assert_not($mol_compare_deep(new URLSearchParams({ foo: 'xxx', bar: 'yyy' }), new URLSearchParams({ bar: 'yyy', foo: 'xxx' })));
4944
+ },
4938
4945
  });
4939
4946
  })($ || ($ = {}));
4940
4947
  //mol/compare/deep/deep.test.tsx