mol_wire_lib 1.0.418 → 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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mol_wire_lib",
3
- "version": "1.0.418",
3
+ "version": "1.0.419",
4
4
  "main": "node.js",
5
5
  "module": "node.esm.js",
6
6
  "browser": "web.js",
package/web.test.js CHANGED
@@ -1092,21 +1092,17 @@ var $;
1092
1092
  'Flow: Auto'($) {
1093
1093
  class App extends $mol_object2 {
1094
1094
  static get $() { return $; }
1095
- static first(next = 1) { return next; }
1096
- static second(next = 2) { return next; }
1095
+ static source(next = 1) { return next; }
1097
1096
  static condition(next = true) { return next; }
1098
1097
  static counter = 0;
1099
1098
  static result() {
1100
- const res = this.condition() ? this.first() : this.second();
1099
+ const res = this.condition() ? this.source() : 0;
1101
1100
  return res + this.counter++;
1102
1101
  }
1103
1102
  }
1104
1103
  __decorate([
1105
1104
  $mol_wire_solo
1106
- ], App, "first", null);
1107
- __decorate([
1108
- $mol_wire_solo
1109
- ], App, "second", null);
1105
+ ], App, "source", null);
1110
1106
  __decorate([
1111
1107
  $mol_wire_solo
1112
1108
  ], App, "condition", null);
@@ -1115,17 +1111,20 @@ var $;
1115
1111
  ], App, "result", null);
1116
1112
  $mol_assert_equal(App.result(), 1);
1117
1113
  $mol_assert_equal(App.counter, 1);
1118
- App.first(10);
1114
+ App.source(10);
1119
1115
  $mol_assert_equal(App.result(), 11);
1120
1116
  $mol_assert_equal(App.counter, 2);
1121
1117
  App.condition(false);
1122
- $mol_assert_equal(App.result(), 4);
1118
+ $mol_assert_equal(App.result(), 2);
1123
1119
  $mol_assert_equal(App.counter, 3);
1124
1120
  $mol_wire_fiber.sync();
1125
- $mol_assert_equal(App.first(), 1);
1126
- App.first(20);
1127
- $mol_assert_equal(App.result(), 4);
1121
+ $mol_assert_equal(App.source(), 1);
1122
+ App.source(20);
1123
+ $mol_assert_equal(App.result(), 2);
1128
1124
  $mol_assert_equal(App.counter, 3);
1125
+ App.condition(true);
1126
+ $mol_assert_equal(App.result(), 23);
1127
+ $mol_assert_equal(App.counter, 4);
1129
1128
  },
1130
1129
  'Dupes: Equality'($) {
1131
1130
  let counter = 0;