mol_crypto_lib 0.1.1252 → 0.1.1254
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/package.json
CHANGED
package/web.test.js
CHANGED
@@ -730,9 +730,10 @@ var $;
|
|
730
730
|
return right_cache;
|
731
731
|
}
|
732
732
|
else {
|
733
|
-
left_cache = new WeakMap(
|
733
|
+
left_cache = new WeakMap();
|
734
734
|
$.$mol_compare_deep_cache.set(left, left_cache);
|
735
735
|
}
|
736
|
+
left_cache.set(right, true);
|
736
737
|
let result;
|
737
738
|
try {
|
738
739
|
if (!left_proto)
|
@@ -884,6 +885,20 @@ var $;
|
|
884
885
|
b['self'] = b;
|
885
886
|
$mol_assert_ok($mol_compare_deep(a, b));
|
886
887
|
},
|
888
|
+
'same POJOs with cyclic reference with cache warmup'() {
|
889
|
+
const obj1 = { test: 1, obj3: null };
|
890
|
+
const obj1_copy = { test: 1, obj3: null };
|
891
|
+
const obj2 = { test: 2, obj1 };
|
892
|
+
const obj2_copy = { test: 2, obj1: obj1_copy };
|
893
|
+
const obj3 = { test: 3, obj2 };
|
894
|
+
const obj3_copy = { test: 3, obj2: obj2_copy };
|
895
|
+
obj1.obj3 = obj3;
|
896
|
+
obj1_copy.obj3 = obj3_copy;
|
897
|
+
$mol_assert_not($mol_compare_deep(obj1, {}));
|
898
|
+
$mol_assert_not($mol_compare_deep(obj2, {}));
|
899
|
+
$mol_assert_not($mol_compare_deep(obj3, {}));
|
900
|
+
$mol_assert_ok($mol_compare_deep(obj3, obj3_copy));
|
901
|
+
},
|
887
902
|
'Date'() {
|
888
903
|
$mol_assert_ok($mol_compare_deep(new Date(12345), new Date(12345)));
|
889
904
|
$mol_assert_not($mol_compare_deep(new Date(12345), new Date(12346)));
|