mol_mutable 0.0.1061 → 0.0.1063

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
@@ -534,7 +534,7 @@ var $;
534
534
  if (this[$mol_ambient_ref])
535
535
  return this[$mol_ambient_ref];
536
536
  const owner = $mol_owning_get(this);
537
- return this[$mol_ambient_ref] = owner?.$ || $mol_object2.$;
537
+ return this[$mol_ambient_ref] = owner?.$ || this.constructor.$ || $mol_object2.$;
538
538
  }
539
539
  set $(next) {
540
540
  if (this[$mol_ambient_ref])
@@ -588,7 +588,7 @@ var $;
588
588
  ;
589
589
  "use strict";
590
590
  var $;
591
- (function ($) {
591
+ (function ($_1) {
592
592
  $mol_test({
593
593
  'init with overload'() {
594
594
  class X extends $mol_object {
@@ -601,6 +601,13 @@ var $;
601
601
  });
602
602
  $mol_assert_equal(x.foo(), 2);
603
603
  },
604
+ 'Context in instance inherits from class'($) {
605
+ const custom = $.$mol_ambient({});
606
+ class X extends $.$mol_object {
607
+ static $ = custom;
608
+ }
609
+ $mol_assert_equal(new X().$, custom);
610
+ },
604
611
  });
605
612
  })($ || ($ = {}));
606
613
 
@@ -1949,7 +1956,7 @@ var $;
1949
1956
  }
1950
1957
  await $mol_wire_async(A).a();
1951
1958
  $mol_assert_equal(A.instances.length, 2);
1952
- $mol_assert_equal(A.instances[0] instanceof A);
1959
+ $mol_assert_equal(A.instances[0] instanceof A, true);
1953
1960
  $mol_assert_equal(A.instances[0], A.instances[1]);
1954
1961
  }
1955
1962
  });
@@ -3240,16 +3247,16 @@ var $;
3240
3247
  $mol_assert_unique([1], [2], [3]);
3241
3248
  },
3242
3249
  'two must be alike'() {
3243
- $mol_assert_like([3], [3]);
3250
+ $mol_assert_equal([3], [3]);
3244
3251
  },
3245
3252
  'three must be alike'() {
3246
- $mol_assert_like([3], [3], [3]);
3253
+ $mol_assert_equal([3], [3], [3]);
3247
3254
  },
3248
3255
  'two object must be alike'() {
3249
- $mol_assert_like({ a: 1 }, { a: 1 });
3256
+ $mol_assert_equal({ a: 1 }, { a: 1 });
3250
3257
  },
3251
3258
  'three object must be alike'() {
3252
- $mol_assert_like({ a: 1 }, { a: 1 }, { a: 1 });
3259
+ $mol_assert_equal({ a: 1 }, { a: 1 }, { a: 1 });
3253
3260
  },
3254
3261
  });
3255
3262
  })($ || ($ = {}));