mol_crypto_lib 0.1.1658 → 0.1.1660

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
@@ -547,7 +547,7 @@ var $;
547
547
  if (this[$mol_ambient_ref])
548
548
  return this[$mol_ambient_ref];
549
549
  const owner = $mol_owning_get(this);
550
- return this[$mol_ambient_ref] = owner?.$ || $mol_object2.$;
550
+ return this[$mol_ambient_ref] = owner?.$ || this.constructor.$ || $mol_object2.$;
551
551
  }
552
552
  set $(next) {
553
553
  if (this[$mol_ambient_ref])
package/node.test.js CHANGED
@@ -538,7 +538,7 @@ var $;
538
538
  if (this[$mol_ambient_ref])
539
539
  return this[$mol_ambient_ref];
540
540
  const owner = $mol_owning_get(this);
541
- return this[$mol_ambient_ref] = owner?.$ || $mol_object2.$;
541
+ return this[$mol_ambient_ref] = owner?.$ || this.constructor.$ || $mol_object2.$;
542
542
  }
543
543
  set $(next) {
544
544
  if (this[$mol_ambient_ref])
@@ -3011,7 +3011,7 @@ var $;
3011
3011
  ;
3012
3012
  "use strict";
3013
3013
  var $;
3014
- (function ($) {
3014
+ (function ($_1) {
3015
3015
  $mol_test({
3016
3016
  'init with overload'() {
3017
3017
  class X extends $mol_object {
@@ -3024,6 +3024,13 @@ var $;
3024
3024
  });
3025
3025
  $mol_assert_equal(x.foo(), 2);
3026
3026
  },
3027
+ 'Context in instance inherits from class'($) {
3028
+ const custom = $.$mol_ambient({});
3029
+ class X extends $.$mol_object {
3030
+ static $ = custom;
3031
+ }
3032
+ $mol_assert_equal(new X().$, custom);
3033
+ },
3027
3034
  });
3028
3035
  })($ || ($ = {}));
3029
3036
 
@@ -3384,7 +3391,7 @@ var $;
3384
3391
  }
3385
3392
  await $mol_wire_async(A).a();
3386
3393
  $mol_assert_equal(A.instances.length, 2);
3387
- $mol_assert_equal(A.instances[0] instanceof A);
3394
+ $mol_assert_equal(A.instances[0] instanceof A, true);
3388
3395
  $mol_assert_equal(A.instances[0], A.instances[1]);
3389
3396
  }
3390
3397
  });
@@ -4391,16 +4398,16 @@ var $;
4391
4398
  $mol_assert_unique([1], [2], [3]);
4392
4399
  },
4393
4400
  'two must be alike'() {
4394
- $mol_assert_like([3], [3]);
4401
+ $mol_assert_equal([3], [3]);
4395
4402
  },
4396
4403
  'three must be alike'() {
4397
- $mol_assert_like([3], [3], [3]);
4404
+ $mol_assert_equal([3], [3], [3]);
4398
4405
  },
4399
4406
  'two object must be alike'() {
4400
- $mol_assert_like({ a: 1 }, { a: 1 });
4407
+ $mol_assert_equal({ a: 1 }, { a: 1 });
4401
4408
  },
4402
4409
  'three object must be alike'() {
4403
- $mol_assert_like({ a: 1 }, { a: 1 }, { a: 1 });
4410
+ $mol_assert_equal({ a: 1 }, { a: 1 }, { a: 1 });
4404
4411
  },
4405
4412
  });
4406
4413
  })($ || ($ = {}));