mol_dump_lib 0.0.867 → 0.0.869

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.mjs CHANGED
@@ -372,7 +372,7 @@ var $;
372
372
  if (this[$mol_ambient_ref])
373
373
  return this[$mol_ambient_ref];
374
374
  const owner = $mol_owning_get(this);
375
- return this[$mol_ambient_ref] = owner?.$ || $mol_object2.$;
375
+ return this[$mol_ambient_ref] = owner?.$ || this.constructor.$ || $mol_object2.$;
376
376
  }
377
377
  set $(next) {
378
378
  if (this[$mol_ambient_ref])
package/node.test.js CHANGED
@@ -363,7 +363,7 @@ var $;
363
363
  if (this[$mol_ambient_ref])
364
364
  return this[$mol_ambient_ref];
365
365
  const owner = $mol_owning_get(this);
366
- return this[$mol_ambient_ref] = owner?.$ || $mol_object2.$;
366
+ return this[$mol_ambient_ref] = owner?.$ || this.constructor.$ || $mol_object2.$;
367
367
  }
368
368
  set $(next) {
369
369
  if (this[$mol_ambient_ref])
@@ -7749,16 +7749,16 @@ var $;
7749
7749
  $mol_assert_unique([1], [2], [3]);
7750
7750
  },
7751
7751
  'two must be alike'() {
7752
- $mol_assert_like([3], [3]);
7752
+ $mol_assert_equal([3], [3]);
7753
7753
  },
7754
7754
  'three must be alike'() {
7755
- $mol_assert_like([3], [3], [3]);
7755
+ $mol_assert_equal([3], [3], [3]);
7756
7756
  },
7757
7757
  'two object must be alike'() {
7758
- $mol_assert_like({ a: 1 }, { a: 1 });
7758
+ $mol_assert_equal({ a: 1 }, { a: 1 });
7759
7759
  },
7760
7760
  'three object must be alike'() {
7761
- $mol_assert_like({ a: 1 }, { a: 1 }, { a: 1 });
7761
+ $mol_assert_equal({ a: 1 }, { a: 1 }, { a: 1 });
7762
7762
  },
7763
7763
  });
7764
7764
  })($ || ($ = {}));
@@ -8165,7 +8165,7 @@ var $;
8165
8165
  ;
8166
8166
  "use strict";
8167
8167
  var $;
8168
- (function ($) {
8168
+ (function ($_1) {
8169
8169
  $mol_test({
8170
8170
  'init with overload'() {
8171
8171
  class X extends $mol_object {
@@ -8178,6 +8178,13 @@ var $;
8178
8178
  });
8179
8179
  $mol_assert_equal(x.foo(), 2);
8180
8180
  },
8181
+ 'Context in instance inherits from class'($) {
8182
+ const custom = $.$mol_ambient({});
8183
+ class X extends $.$mol_object {
8184
+ static $ = custom;
8185
+ }
8186
+ $mol_assert_equal(new X().$, custom);
8187
+ },
8181
8188
  });
8182
8189
  })($ || ($ = {}));
8183
8190
 
@@ -8468,7 +8475,7 @@ var $;
8468
8475
  }
8469
8476
  await $mol_wire_async(A).a();
8470
8477
  $mol_assert_equal(A.instances.length, 2);
8471
- $mol_assert_equal(A.instances[0] instanceof A);
8478
+ $mol_assert_equal(A.instances[0] instanceof A, true);
8472
8479
  $mol_assert_equal(A.instances[0], A.instances[1]);
8473
8480
  }
8474
8481
  });