mol_wire_lib 1.0.431 → 1.0.433

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
@@ -4073,24 +4073,30 @@ var $;
4073
4073
  (function ($) {
4074
4074
  $mol_test({
4075
4075
  'define as methods'() {
4076
- const { foo, bar } = $mol_wire_let({
4076
+ const { foo, bar, lol } = $mol_wire_let({
4077
4077
  foo(next = 1) { return next; },
4078
4078
  bar() { return this.foo() + 1; },
4079
+ lol(next) { return this.foo(next); },
4079
4080
  });
4080
4081
  $mol_assert_equal(foo(), 1);
4081
4082
  $mol_assert_equal(bar(), 2);
4082
4083
  $mol_assert_equal(foo(5), 5);
4083
4084
  $mol_assert_equal(bar(), 6);
4085
+ $mol_assert_equal(lol(10), 10);
4086
+ $mol_assert_equal(bar(), 11);
4084
4087
  },
4085
4088
  'define as closures'() {
4086
- const { foo, bar } = $mol_wire_let({
4089
+ const { foo, bar, lol } = $mol_wire_let({
4087
4090
  foo: (next = 1) => next,
4088
4091
  bar: () => foo() + 1,
4092
+ lol: (next) => foo(next),
4089
4093
  });
4090
4094
  $mol_assert_equal(foo(), 1);
4091
4095
  $mol_assert_equal(bar(), 2);
4092
4096
  $mol_assert_equal(foo(5), 5);
4093
4097
  $mol_assert_equal(bar(), 6);
4098
+ $mol_assert_equal(lol(10), 10);
4099
+ $mol_assert_equal(bar(), 11);
4094
4100
  },
4095
4101
  });
4096
4102
  })($ || ($ = {}));