mol_dump_lib 0.0.867 → 0.0.869
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 +1 -1
- package/node.js.map +1 -1
- package/node.mjs +1 -1
- package/node.test.js +14 -7
- package/node.test.js.map +1 -1
- package/package.json +1 -1
- package/web.deps.json +1 -1
- package/web.js +1 -1
- package/web.js.map +1 -1
- package/web.mjs +1 -1
- package/web.test.js +13 -6
- package/web.test.js.map +1 -1
package/web.mjs
CHANGED
|
@@ -449,7 +449,7 @@ var $;
|
|
|
449
449
|
if (this[$mol_ambient_ref])
|
|
450
450
|
return this[$mol_ambient_ref];
|
|
451
451
|
const owner = $mol_owning_get(this);
|
|
452
|
-
return this[$mol_ambient_ref] = owner?.$ || $mol_object2.$;
|
|
452
|
+
return this[$mol_ambient_ref] = owner?.$ || this.constructor.$ || $mol_object2.$;
|
|
453
453
|
}
|
|
454
454
|
set $(next) {
|
|
455
455
|
if (this[$mol_ambient_ref])
|
package/web.test.js
CHANGED
|
@@ -724,16 +724,16 @@ var $;
|
|
|
724
724
|
$mol_assert_unique([1], [2], [3]);
|
|
725
725
|
},
|
|
726
726
|
'two must be alike'() {
|
|
727
|
-
$
|
|
727
|
+
$mol_assert_equal([3], [3]);
|
|
728
728
|
},
|
|
729
729
|
'three must be alike'() {
|
|
730
|
-
$
|
|
730
|
+
$mol_assert_equal([3], [3], [3]);
|
|
731
731
|
},
|
|
732
732
|
'two object must be alike'() {
|
|
733
|
-
$
|
|
733
|
+
$mol_assert_equal({ a: 1 }, { a: 1 });
|
|
734
734
|
},
|
|
735
735
|
'three object must be alike'() {
|
|
736
|
-
$
|
|
736
|
+
$mol_assert_equal({ a: 1 }, { a: 1 }, { a: 1 });
|
|
737
737
|
},
|
|
738
738
|
});
|
|
739
739
|
})($ || ($ = {}));
|
|
@@ -841,7 +841,7 @@ var $;
|
|
|
841
841
|
;
|
|
842
842
|
"use strict";
|
|
843
843
|
var $;
|
|
844
|
-
(function ($) {
|
|
844
|
+
(function ($_1) {
|
|
845
845
|
$mol_test({
|
|
846
846
|
'init with overload'() {
|
|
847
847
|
class X extends $mol_object {
|
|
@@ -854,6 +854,13 @@ var $;
|
|
|
854
854
|
});
|
|
855
855
|
$mol_assert_equal(x.foo(), 2);
|
|
856
856
|
},
|
|
857
|
+
'Context in instance inherits from class'($) {
|
|
858
|
+
const custom = $.$mol_ambient({});
|
|
859
|
+
class X extends $.$mol_object {
|
|
860
|
+
static $ = custom;
|
|
861
|
+
}
|
|
862
|
+
$mol_assert_equal(new X().$, custom);
|
|
863
|
+
},
|
|
857
864
|
});
|
|
858
865
|
})($ || ($ = {}));
|
|
859
866
|
|
|
@@ -1156,7 +1163,7 @@ var $;
|
|
|
1156
1163
|
}
|
|
1157
1164
|
await $mol_wire_async(A).a();
|
|
1158
1165
|
$mol_assert_equal(A.instances.length, 2);
|
|
1159
|
-
$mol_assert_equal(A.instances[0] instanceof A);
|
|
1166
|
+
$mol_assert_equal(A.instances[0] instanceof A, true);
|
|
1160
1167
|
$mol_assert_equal(A.instances[0], A.instances[1]);
|
|
1161
1168
|
}
|
|
1162
1169
|
});
|