mol_text_distance 0.0.1335 → 0.0.1337

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
@@ -557,7 +557,7 @@ var $;
557
557
  if (this[$mol_ambient_ref])
558
558
  return this[$mol_ambient_ref];
559
559
  const owner = $mol_owning_get(this);
560
- return this[$mol_ambient_ref] = owner?.$ || $mol_object2.$;
560
+ return this[$mol_ambient_ref] = owner?.$ || this.constructor.$ || $mol_object2.$;
561
561
  }
562
562
  set $(next) {
563
563
  if (this[$mol_ambient_ref])
@@ -611,7 +611,7 @@ var $;
611
611
  ;
612
612
  "use strict";
613
613
  var $;
614
- (function ($) {
614
+ (function ($_1) {
615
615
  $mol_test({
616
616
  'init with overload'() {
617
617
  class X extends $mol_object {
@@ -624,6 +624,13 @@ var $;
624
624
  });
625
625
  $mol_assert_equal(x.foo(), 2);
626
626
  },
627
+ 'Context in instance inherits from class'($) {
628
+ const custom = $.$mol_ambient({});
629
+ class X extends $.$mol_object {
630
+ static $ = custom;
631
+ }
632
+ $mol_assert_equal(new X().$, custom);
633
+ },
627
634
  });
628
635
  })($ || ($ = {}));
629
636
 
@@ -1972,7 +1979,7 @@ var $;
1972
1979
  }
1973
1980
  await $mol_wire_async(A).a();
1974
1981
  $mol_assert_equal(A.instances.length, 2);
1975
- $mol_assert_equal(A.instances[0] instanceof A);
1982
+ $mol_assert_equal(A.instances[0] instanceof A, true);
1976
1983
  $mol_assert_equal(A.instances[0], A.instances[1]);
1977
1984
  }
1978
1985
  });
@@ -3263,16 +3270,16 @@ var $;
3263
3270
  $mol_assert_unique([1], [2], [3]);
3264
3271
  },
3265
3272
  'two must be alike'() {
3266
- $mol_assert_like([3], [3]);
3273
+ $mol_assert_equal([3], [3]);
3267
3274
  },
3268
3275
  'three must be alike'() {
3269
- $mol_assert_like([3], [3], [3]);
3276
+ $mol_assert_equal([3], [3], [3]);
3270
3277
  },
3271
3278
  'two object must be alike'() {
3272
- $mol_assert_like({ a: 1 }, { a: 1 });
3279
+ $mol_assert_equal({ a: 1 }, { a: 1 });
3273
3280
  },
3274
3281
  'three object must be alike'() {
3275
- $mol_assert_like({ a: 1 }, { a: 1 }, { a: 1 });
3282
+ $mol_assert_equal({ a: 1 }, { a: 1 }, { a: 1 });
3276
3283
  },
3277
3284
  });
3278
3285
  })($ || ($ = {}));