mol_key 0.0.1402 → 0.0.1403

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 CHANGED
@@ -853,7 +853,7 @@ var $;
853
853
  if (this[$mol_ambient_ref])
854
854
  return this[$mol_ambient_ref];
855
855
  const owner = $mol_owning_get(this);
856
- return this[$mol_ambient_ref] = owner?.$ || $mol_object2.$;
856
+ return this[$mol_ambient_ref] = owner?.$ || this.constructor.$ || $mol_object2.$;
857
857
  }
858
858
  set $(next) {
859
859
  if (this[$mol_ambient_ref])
@@ -1817,7 +1817,7 @@ var $;
1817
1817
  ;
1818
1818
  "use strict";
1819
1819
  var $;
1820
- (function ($) {
1820
+ (function ($_1) {
1821
1821
  $mol_test({
1822
1822
  'init with overload'() {
1823
1823
  class X extends $mol_object {
@@ -1830,6 +1830,13 @@ var $;
1830
1830
  });
1831
1831
  $mol_assert_equal(x.foo(), 2);
1832
1832
  },
1833
+ 'Context in instance inherits from class'($) {
1834
+ const custom = $.$mol_ambient({});
1835
+ class X extends $.$mol_object {
1836
+ static $ = custom;
1837
+ }
1838
+ $mol_assert_equal(new X().$, custom);
1839
+ },
1833
1840
  });
1834
1841
  })($ || ($ = {}));
1835
1842