mol_db 0.0.1173 → 0.0.1175
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 +16 -1
- package/node.test.js.map +1 -1
- package/package.json +1 -1
- package/web.test.js +16 -1
- package/web.test.js.map +1 -1
package/node.test.js
CHANGED
|
@@ -1869,9 +1869,10 @@ var $;
|
|
|
1869
1869
|
return right_cache;
|
|
1870
1870
|
}
|
|
1871
1871
|
else {
|
|
1872
|
-
left_cache = new WeakMap(
|
|
1872
|
+
left_cache = new WeakMap();
|
|
1873
1873
|
$.$mol_compare_deep_cache.set(left, left_cache);
|
|
1874
1874
|
}
|
|
1875
|
+
left_cache.set(right, true);
|
|
1875
1876
|
let result;
|
|
1876
1877
|
try {
|
|
1877
1878
|
if (!left_proto)
|
|
@@ -2023,6 +2024,20 @@ var $;
|
|
|
2023
2024
|
b['self'] = b;
|
|
2024
2025
|
$mol_assert_ok($mol_compare_deep(a, b));
|
|
2025
2026
|
},
|
|
2027
|
+
'same POJOs with cyclic reference with cache warmup'() {
|
|
2028
|
+
const obj1 = { test: 1, obj3: null };
|
|
2029
|
+
const obj1_copy = { test: 1, obj3: null };
|
|
2030
|
+
const obj2 = { test: 2, obj1 };
|
|
2031
|
+
const obj2_copy = { test: 2, obj1: obj1_copy };
|
|
2032
|
+
const obj3 = { test: 3, obj2 };
|
|
2033
|
+
const obj3_copy = { test: 3, obj2: obj2_copy };
|
|
2034
|
+
obj1.obj3 = obj3;
|
|
2035
|
+
obj1_copy.obj3 = obj3_copy;
|
|
2036
|
+
$mol_assert_not($mol_compare_deep(obj1, {}));
|
|
2037
|
+
$mol_assert_not($mol_compare_deep(obj2, {}));
|
|
2038
|
+
$mol_assert_not($mol_compare_deep(obj3, {}));
|
|
2039
|
+
$mol_assert_ok($mol_compare_deep(obj3, obj3_copy));
|
|
2040
|
+
},
|
|
2026
2041
|
'Date'() {
|
|
2027
2042
|
$mol_assert_ok($mol_compare_deep(new Date(12345), new Date(12345)));
|
|
2028
2043
|
$mol_assert_not($mol_compare_deep(new Date(12345), new Date(12346)));
|