mol_key 0.0.1401 → 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
@@ -530,16 +530,16 @@ var $;
530
530
  $mol_assert_unique([1], [2], [3]);
531
531
  },
532
532
  'two must be alike'() {
533
- $mol_assert_like([3], [3]);
533
+ $mol_assert_equal([3], [3]);
534
534
  },
535
535
  'three must be alike'() {
536
- $mol_assert_like([3], [3], [3]);
536
+ $mol_assert_equal([3], [3], [3]);
537
537
  },
538
538
  'two object must be alike'() {
539
- $mol_assert_like({ a: 1 }, { a: 1 });
539
+ $mol_assert_equal({ a: 1 }, { a: 1 });
540
540
  },
541
541
  'three object must be alike'() {
542
- $mol_assert_like({ a: 1 }, { a: 1 }, { a: 1 });
542
+ $mol_assert_equal({ a: 1 }, { a: 1 }, { a: 1 });
543
543
  },
544
544
  });
545
545
  })($ || ($ = {}));
@@ -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
 
@@ -2855,7 +2862,7 @@ var $;
2855
2862
  }
2856
2863
  await $mol_wire_async(A).a();
2857
2864
  $mol_assert_equal(A.instances.length, 2);
2858
- $mol_assert_equal(A.instances[0] instanceof A);
2865
+ $mol_assert_equal(A.instances[0] instanceof A, true);
2859
2866
  $mol_assert_equal(A.instances[0], A.instances[1]);
2860
2867
  }
2861
2868
  });