mol_jsx_lib 0.0.1010 → 0.0.1011
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/node.mjs
CHANGED
|
@@ -1826,9 +1826,10 @@ var $;
|
|
|
1826
1826
|
return right_cache;
|
|
1827
1827
|
}
|
|
1828
1828
|
else {
|
|
1829
|
-
left_cache = new WeakMap(
|
|
1829
|
+
left_cache = new WeakMap();
|
|
1830
1830
|
$.$mol_compare_deep_cache.set(left, left_cache);
|
|
1831
1831
|
}
|
|
1832
|
+
left_cache.set(right, true);
|
|
1832
1833
|
let result;
|
|
1833
1834
|
try {
|
|
1834
1835
|
if (!left_proto)
|
package/node.test.js
CHANGED
|
@@ -1817,9 +1817,10 @@ var $;
|
|
|
1817
1817
|
return right_cache;
|
|
1818
1818
|
}
|
|
1819
1819
|
else {
|
|
1820
|
-
left_cache = new WeakMap(
|
|
1820
|
+
left_cache = new WeakMap();
|
|
1821
1821
|
$.$mol_compare_deep_cache.set(left, left_cache);
|
|
1822
1822
|
}
|
|
1823
|
+
left_cache.set(right, true);
|
|
1823
1824
|
let result;
|
|
1824
1825
|
try {
|
|
1825
1826
|
if (!left_proto)
|
|
@@ -4036,6 +4037,20 @@ var $;
|
|
|
4036
4037
|
b['self'] = b;
|
|
4037
4038
|
$mol_assert_ok($mol_compare_deep(a, b));
|
|
4038
4039
|
},
|
|
4040
|
+
'same POJOs with cyclic reference with cache warmup'() {
|
|
4041
|
+
const obj1 = { test: 1, obj3: null };
|
|
4042
|
+
const obj1_copy = { test: 1, obj3: null };
|
|
4043
|
+
const obj2 = { test: 2, obj1 };
|
|
4044
|
+
const obj2_copy = { test: 2, obj1: obj1_copy };
|
|
4045
|
+
const obj3 = { test: 3, obj2 };
|
|
4046
|
+
const obj3_copy = { test: 3, obj2: obj2_copy };
|
|
4047
|
+
obj1.obj3 = obj3;
|
|
4048
|
+
obj1_copy.obj3 = obj3_copy;
|
|
4049
|
+
$mol_assert_not($mol_compare_deep(obj1, {}));
|
|
4050
|
+
$mol_assert_not($mol_compare_deep(obj2, {}));
|
|
4051
|
+
$mol_assert_not($mol_compare_deep(obj3, {}));
|
|
4052
|
+
$mol_assert_ok($mol_compare_deep(obj3, obj3_copy));
|
|
4053
|
+
},
|
|
4039
4054
|
'Date'() {
|
|
4040
4055
|
$mol_assert_ok($mol_compare_deep(new Date(12345), new Date(12345)));
|
|
4041
4056
|
$mol_assert_not($mol_compare_deep(new Date(12345), new Date(12346)));
|