hyoo_sync_client 0.0.472 → 0.0.474
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.deps.json +1 -1
- package/node.js +2 -1
- package/node.js.map +1 -1
- package/node.mjs +2 -1
- package/node.test.js +16 -1
- package/node.test.js.map +1 -1
- package/package.json +1 -1
- package/web.deps.json +1 -1
- package/web.js +2 -1
- package/web.js.map +1 -1
- package/web.mjs +2 -1
- package/web.test.js +14 -0
- package/web.test.js.map +1 -1
package/web.mjs
CHANGED
|
@@ -1614,9 +1614,10 @@ var $;
|
|
|
1614
1614
|
return right_cache;
|
|
1615
1615
|
}
|
|
1616
1616
|
else {
|
|
1617
|
-
left_cache = new WeakMap(
|
|
1617
|
+
left_cache = new WeakMap();
|
|
1618
1618
|
$.$mol_compare_deep_cache.set(left, left_cache);
|
|
1619
1619
|
}
|
|
1620
|
+
left_cache.set(right, true);
|
|
1620
1621
|
let result;
|
|
1621
1622
|
try {
|
|
1622
1623
|
if (!left_proto)
|
package/web.test.js
CHANGED
|
@@ -536,6 +536,20 @@ var $;
|
|
|
536
536
|
b['self'] = b;
|
|
537
537
|
$mol_assert_ok($mol_compare_deep(a, b));
|
|
538
538
|
},
|
|
539
|
+
'same POJOs with cyclic reference with cache warmup'() {
|
|
540
|
+
const obj1 = { test: 1, obj3: null };
|
|
541
|
+
const obj1_copy = { test: 1, obj3: null };
|
|
542
|
+
const obj2 = { test: 2, obj1 };
|
|
543
|
+
const obj2_copy = { test: 2, obj1: obj1_copy };
|
|
544
|
+
const obj3 = { test: 3, obj2 };
|
|
545
|
+
const obj3_copy = { test: 3, obj2: obj2_copy };
|
|
546
|
+
obj1.obj3 = obj3;
|
|
547
|
+
obj1_copy.obj3 = obj3_copy;
|
|
548
|
+
$mol_assert_not($mol_compare_deep(obj1, {}));
|
|
549
|
+
$mol_assert_not($mol_compare_deep(obj2, {}));
|
|
550
|
+
$mol_assert_not($mol_compare_deep(obj3, {}));
|
|
551
|
+
$mol_assert_ok($mol_compare_deep(obj3, obj3_copy));
|
|
552
|
+
},
|
|
539
553
|
'Date'() {
|
|
540
554
|
$mol_assert_ok($mol_compare_deep(new Date(12345), new Date(12345)));
|
|
541
555
|
$mol_assert_not($mol_compare_deep(new Date(12345), new Date(12346)));
|