mol_view_tree2_lib 1.0.35 → 1.0.37
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/node.mjs
CHANGED
|
@@ -199,7 +199,7 @@ var $;
|
|
|
199
199
|
if (this[$mol_ambient_ref])
|
|
200
200
|
return this[$mol_ambient_ref];
|
|
201
201
|
const owner = $mol_owning_get(this);
|
|
202
|
-
return this[$mol_ambient_ref] = owner?.$ || $mol_object2.$;
|
|
202
|
+
return this[$mol_ambient_ref] = owner?.$ || this.constructor.$ || $mol_object2.$;
|
|
203
203
|
}
|
|
204
204
|
set $(next) {
|
|
205
205
|
if (this[$mol_ambient_ref])
|
package/node.test.js
CHANGED
|
@@ -190,7 +190,7 @@ var $;
|
|
|
190
190
|
if (this[$mol_ambient_ref])
|
|
191
191
|
return this[$mol_ambient_ref];
|
|
192
192
|
const owner = $mol_owning_get(this);
|
|
193
|
-
return this[$mol_ambient_ref] = owner?.$ || $mol_object2.$;
|
|
193
|
+
return this[$mol_ambient_ref] = owner?.$ || this.constructor.$ || $mol_object2.$;
|
|
194
194
|
}
|
|
195
195
|
set $(next) {
|
|
196
196
|
if (this[$mol_ambient_ref])
|
|
@@ -6302,16 +6302,16 @@ var $;
|
|
|
6302
6302
|
$mol_assert_unique([1], [2], [3]);
|
|
6303
6303
|
},
|
|
6304
6304
|
'two must be alike'() {
|
|
6305
|
-
$
|
|
6305
|
+
$mol_assert_equal([3], [3]);
|
|
6306
6306
|
},
|
|
6307
6307
|
'three must be alike'() {
|
|
6308
|
-
$
|
|
6308
|
+
$mol_assert_equal([3], [3], [3]);
|
|
6309
6309
|
},
|
|
6310
6310
|
'two object must be alike'() {
|
|
6311
|
-
$
|
|
6311
|
+
$mol_assert_equal({ a: 1 }, { a: 1 });
|
|
6312
6312
|
},
|
|
6313
6313
|
'three object must be alike'() {
|
|
6314
|
-
$
|
|
6314
|
+
$mol_assert_equal({ a: 1 }, { a: 1 }, { a: 1 });
|
|
6315
6315
|
},
|
|
6316
6316
|
});
|
|
6317
6317
|
})($ || ($ = {}));
|
|
@@ -6432,7 +6432,7 @@ var $;
|
|
|
6432
6432
|
;
|
|
6433
6433
|
"use strict";
|
|
6434
6434
|
var $;
|
|
6435
|
-
(function ($) {
|
|
6435
|
+
(function ($_1) {
|
|
6436
6436
|
$mol_test({
|
|
6437
6437
|
'init with overload'() {
|
|
6438
6438
|
class X extends $mol_object {
|
|
@@ -6445,6 +6445,13 @@ var $;
|
|
|
6445
6445
|
});
|
|
6446
6446
|
$mol_assert_equal(x.foo(), 2);
|
|
6447
6447
|
},
|
|
6448
|
+
'Context in instance inherits from class'($) {
|
|
6449
|
+
const custom = $.$mol_ambient({});
|
|
6450
|
+
class X extends $.$mol_object {
|
|
6451
|
+
static $ = custom;
|
|
6452
|
+
}
|
|
6453
|
+
$mol_assert_equal(new X().$, custom);
|
|
6454
|
+
},
|
|
6448
6455
|
});
|
|
6449
6456
|
})($ || ($ = {}));
|
|
6450
6457
|
|
|
@@ -6735,7 +6742,7 @@ var $;
|
|
|
6735
6742
|
}
|
|
6736
6743
|
await $mol_wire_async(A).a();
|
|
6737
6744
|
$mol_assert_equal(A.instances.length, 2);
|
|
6738
|
-
$mol_assert_equal(A.instances[0] instanceof A);
|
|
6745
|
+
$mol_assert_equal(A.instances[0] instanceof A, true);
|
|
6739
6746
|
$mol_assert_equal(A.instances[0], A.instances[1]);
|
|
6740
6747
|
}
|
|
6741
6748
|
});
|