mol_conform 0.0.105 → 0.0.107

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
@@ -602,7 +602,7 @@ var $;
602
602
  if (this[$mol_ambient_ref])
603
603
  return this[$mol_ambient_ref];
604
604
  const owner = $mol_owning_get(this);
605
- return this[$mol_ambient_ref] = owner?.$ || $mol_object2.$;
605
+ return this[$mol_ambient_ref] = owner?.$ || this.constructor.$ || $mol_object2.$;
606
606
  }
607
607
  set $(next) {
608
608
  if (this[$mol_ambient_ref])
@@ -656,7 +656,7 @@ var $;
656
656
  ;
657
657
  "use strict";
658
658
  var $;
659
- (function ($) {
659
+ (function ($_1) {
660
660
  $mol_test({
661
661
  'init with overload'() {
662
662
  class X extends $mol_object {
@@ -669,6 +669,13 @@ var $;
669
669
  });
670
670
  $mol_assert_equal(x.foo(), 2);
671
671
  },
672
+ 'Context in instance inherits from class'($) {
673
+ const custom = $.$mol_ambient({});
674
+ class X extends $.$mol_object {
675
+ static $ = custom;
676
+ }
677
+ $mol_assert_equal(new X().$, custom);
678
+ },
672
679
  });
673
680
  })($ || ($ = {}));
674
681
 
@@ -2017,7 +2024,7 @@ var $;
2017
2024
  }
2018
2025
  await $mol_wire_async(A).a();
2019
2026
  $mol_assert_equal(A.instances.length, 2);
2020
- $mol_assert_equal(A.instances[0] instanceof A);
2027
+ $mol_assert_equal(A.instances[0] instanceof A, true);
2021
2028
  $mol_assert_equal(A.instances[0], A.instances[1]);
2022
2029
  }
2023
2030
  });
@@ -3308,16 +3315,16 @@ var $;
3308
3315
  $mol_assert_unique([1], [2], [3]);
3309
3316
  },
3310
3317
  'two must be alike'() {
3311
- $mol_assert_like([3], [3]);
3318
+ $mol_assert_equal([3], [3]);
3312
3319
  },
3313
3320
  'three must be alike'() {
3314
- $mol_assert_like([3], [3], [3]);
3321
+ $mol_assert_equal([3], [3], [3]);
3315
3322
  },
3316
3323
  'two object must be alike'() {
3317
- $mol_assert_like({ a: 1 }, { a: 1 });
3324
+ $mol_assert_equal({ a: 1 }, { a: 1 });
3318
3325
  },
3319
3326
  'three object must be alike'() {
3320
- $mol_assert_like({ a: 1 }, { a: 1 }, { a: 1 });
3327
+ $mol_assert_equal({ a: 1 }, { a: 1 }, { a: 1 });
3321
3328
  },
3322
3329
  });
3323
3330
  })($ || ($ = {}));