mol_wire_lib 1.0.417 → 1.0.419

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
@@ -3399,21 +3399,17 @@ var $;
3399
3399
  'Flow: Auto'($) {
3400
3400
  class App extends $mol_object2 {
3401
3401
  static get $() { return $; }
3402
- static first(next = 1) { return next; }
3403
- static second(next = 2) { return next; }
3402
+ static source(next = 1) { return next; }
3404
3403
  static condition(next = true) { return next; }
3405
3404
  static counter = 0;
3406
3405
  static result() {
3407
- const res = this.condition() ? this.first() : this.second();
3406
+ const res = this.condition() ? this.source() : 0;
3408
3407
  return res + this.counter++;
3409
3408
  }
3410
3409
  }
3411
3410
  __decorate([
3412
3411
  $mol_wire_solo
3413
- ], App, "first", null);
3414
- __decorate([
3415
- $mol_wire_solo
3416
- ], App, "second", null);
3412
+ ], App, "source", null);
3417
3413
  __decorate([
3418
3414
  $mol_wire_solo
3419
3415
  ], App, "condition", null);
@@ -3422,12 +3418,20 @@ var $;
3422
3418
  ], App, "result", null);
3423
3419
  $mol_assert_equal(App.result(), 1);
3424
3420
  $mol_assert_equal(App.counter, 1);
3425
- App.condition(false);
3426
- $mol_assert_equal(App.result(), 3);
3427
- $mol_assert_equal(App.counter, 2);
3428
- App.first(10);
3429
- $mol_assert_equal(App.result(), 3);
3421
+ App.source(10);
3422
+ $mol_assert_equal(App.result(), 11);
3430
3423
  $mol_assert_equal(App.counter, 2);
3424
+ App.condition(false);
3425
+ $mol_assert_equal(App.result(), 2);
3426
+ $mol_assert_equal(App.counter, 3);
3427
+ $mol_wire_fiber.sync();
3428
+ $mol_assert_equal(App.source(), 1);
3429
+ App.source(20);
3430
+ $mol_assert_equal(App.result(), 2);
3431
+ $mol_assert_equal(App.counter, 3);
3432
+ App.condition(true);
3433
+ $mol_assert_equal(App.result(), 23);
3434
+ $mol_assert_equal(App.counter, 4);
3431
3435
  },
3432
3436
  'Dupes: Equality'($) {
3433
3437
  let counter = 0;