mol_regexp 0.0.1678 → 0.0.1680

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
@@ -799,7 +799,7 @@ var $;
799
799
  if (this[$mol_ambient_ref])
800
800
  return this[$mol_ambient_ref];
801
801
  const owner = $mol_owning_get(this);
802
- return this[$mol_ambient_ref] = owner?.$ || $mol_object2.$;
802
+ return this[$mol_ambient_ref] = owner?.$ || this.constructor.$ || $mol_object2.$;
803
803
  }
804
804
  set $(next) {
805
805
  if (this[$mol_ambient_ref])
@@ -853,7 +853,7 @@ var $;
853
853
  ;
854
854
  "use strict";
855
855
  var $;
856
- (function ($) {
856
+ (function ($_1) {
857
857
  $mol_test({
858
858
  'init with overload'() {
859
859
  class X extends $mol_object {
@@ -866,6 +866,13 @@ var $;
866
866
  });
867
867
  $mol_assert_equal(x.foo(), 2);
868
868
  },
869
+ 'Context in instance inherits from class'($) {
870
+ const custom = $.$mol_ambient({});
871
+ class X extends $.$mol_object {
872
+ static $ = custom;
873
+ }
874
+ $mol_assert_equal(new X().$, custom);
875
+ },
869
876
  });
870
877
  })($ || ($ = {}));
871
878
 
@@ -2214,7 +2221,7 @@ var $;
2214
2221
  }
2215
2222
  await $mol_wire_async(A).a();
2216
2223
  $mol_assert_equal(A.instances.length, 2);
2217
- $mol_assert_equal(A.instances[0] instanceof A);
2224
+ $mol_assert_equal(A.instances[0] instanceof A, true);
2218
2225
  $mol_assert_equal(A.instances[0], A.instances[1]);
2219
2226
  }
2220
2227
  });
@@ -3505,16 +3512,16 @@ var $;
3505
3512
  $mol_assert_unique([1], [2], [3]);
3506
3513
  },
3507
3514
  'two must be alike'() {
3508
- $mol_assert_like([3], [3]);
3515
+ $mol_assert_equal([3], [3]);
3509
3516
  },
3510
3517
  'three must be alike'() {
3511
- $mol_assert_like([3], [3], [3]);
3518
+ $mol_assert_equal([3], [3], [3]);
3512
3519
  },
3513
3520
  'two object must be alike'() {
3514
- $mol_assert_like({ a: 1 }, { a: 1 });
3521
+ $mol_assert_equal({ a: 1 }, { a: 1 });
3515
3522
  },
3516
3523
  'three object must be alike'() {
3517
- $mol_assert_like({ a: 1 }, { a: 1 }, { a: 1 });
3524
+ $mol_assert_equal({ a: 1 }, { a: 1 }, { a: 1 });
3518
3525
  },
3519
3526
  });
3520
3527
  })($ || ($ = {}));