mol_jsx_lib 0.0.1010 → 0.0.1012
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
|
@@ -1199,9 +1199,10 @@ var $;
|
|
|
1199
1199
|
return right_cache;
|
|
1200
1200
|
}
|
|
1201
1201
|
else {
|
|
1202
|
-
left_cache = new WeakMap(
|
|
1202
|
+
left_cache = new WeakMap();
|
|
1203
1203
|
$.$mol_compare_deep_cache.set(left, left_cache);
|
|
1204
1204
|
}
|
|
1205
|
+
left_cache.set(right, true);
|
|
1205
1206
|
let result;
|
|
1206
1207
|
try {
|
|
1207
1208
|
if (!left_proto)
|
package/web.test.js
CHANGED
|
@@ -1060,6 +1060,20 @@ var $;
|
|
|
1060
1060
|
b['self'] = b;
|
|
1061
1061
|
$mol_assert_ok($mol_compare_deep(a, b));
|
|
1062
1062
|
},
|
|
1063
|
+
'same POJOs with cyclic reference with cache warmup'() {
|
|
1064
|
+
const obj1 = { test: 1, obj3: null };
|
|
1065
|
+
const obj1_copy = { test: 1, obj3: null };
|
|
1066
|
+
const obj2 = { test: 2, obj1 };
|
|
1067
|
+
const obj2_copy = { test: 2, obj1: obj1_copy };
|
|
1068
|
+
const obj3 = { test: 3, obj2 };
|
|
1069
|
+
const obj3_copy = { test: 3, obj2: obj2_copy };
|
|
1070
|
+
obj1.obj3 = obj3;
|
|
1071
|
+
obj1_copy.obj3 = obj3_copy;
|
|
1072
|
+
$mol_assert_not($mol_compare_deep(obj1, {}));
|
|
1073
|
+
$mol_assert_not($mol_compare_deep(obj2, {}));
|
|
1074
|
+
$mol_assert_not($mol_compare_deep(obj3, {}));
|
|
1075
|
+
$mol_assert_ok($mol_compare_deep(obj3, obj3_copy));
|
|
1076
|
+
},
|
|
1063
1077
|
'Date'() {
|
|
1064
1078
|
$mol_assert_ok($mol_compare_deep(new Date(12345), new Date(12345)));
|
|
1065
1079
|
$mol_assert_not($mol_compare_deep(new Date(12345), new Date(12346)));
|