mol_crypto_lib 0.1.1311 → 0.1.1313

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
@@ -3927,7 +3927,7 @@ var $;
3927
3927
  static last = [];
3928
3928
  static send(next) {
3929
3929
  $mol_wire_sync(this.first).push(next);
3930
- this.$.$mol_wait_timeout(0);
3930
+ $$.$mol_wait_timeout(0);
3931
3931
  this.last.push(next);
3932
3932
  }
3933
3933
  }
@@ -3936,15 +3936,15 @@ var $;
3936
3936
  const promise = name('jin');
3937
3937
  $.$mol_after_mock_warp();
3938
3938
  await promise;
3939
- $mol_assert_like(NameLogger.first, ['john', 'jin']);
3940
- $mol_assert_like(NameLogger.last, ['jin']);
3939
+ $mol_assert_equal(NameLogger.first, ['john', 'jin']);
3940
+ $mol_assert_equal(NameLogger.last, ['jin']);
3941
3941
  },
3942
3942
  async 'Latest function calls wins'($) {
3943
3943
  const first = [];
3944
3944
  const last = [];
3945
3945
  function send_name(next) {
3946
3946
  $mol_wire_sync(first).push(next);
3947
- $.$mol_wait_timeout(0);
3947
+ $$.$mol_wait_timeout(0);
3948
3948
  last.push(next);
3949
3949
  }
3950
3950
  const name = $mol_wire_async(send_name);
@@ -3952,8 +3952,8 @@ var $;
3952
3952
  const promise = name('jin');
3953
3953
  $.$mol_after_mock_warp();
3954
3954
  await promise;
3955
- $mol_assert_like(first, ['john', 'jin']);
3956
- $mol_assert_like(last, ['jin']);
3955
+ $mol_assert_equal(first, ['john', 'jin']);
3956
+ $mol_assert_equal(last, ['jin']);
3957
3957
  },
3958
3958
  });
3959
3959
  })($ || ($ = {}));
@@ -4086,6 +4086,68 @@ var $;
4086
4086
  });
4087
4087
  })($ || ($ = {}));
4088
4088
 
4089
+ ;
4090
+ "use strict";
4091
+ var $;
4092
+ (function ($) {
4093
+ class $mol_after_work extends $mol_object2 {
4094
+ delay;
4095
+ task;
4096
+ id;
4097
+ constructor(delay, task) {
4098
+ super();
4099
+ this.delay = delay;
4100
+ this.task = task;
4101
+ this.id = requestIdleCallback(task, { timeout: delay });
4102
+ }
4103
+ destructor() {
4104
+ cancelIdleCallback(this.id);
4105
+ }
4106
+ }
4107
+ $.$mol_after_work = $mol_after_work;
4108
+ if (typeof requestIdleCallback !== 'function') {
4109
+ $.$mol_after_work = $mol_after_timeout;
4110
+ }
4111
+ })($ || ($ = {}));
4112
+
4113
+ ;
4114
+ "use strict";
4115
+ var $;
4116
+ (function ($_1) {
4117
+ $mol_test_mocks.push($ => {
4118
+ $.$mol_after_work = $mol_after_mock_timeout;
4119
+ });
4120
+ })($ || ($ = {}));
4121
+
4122
+ ;
4123
+ "use strict";
4124
+ var $;
4125
+ (function ($) {
4126
+ function $mol_wait_rest_async() {
4127
+ return new Promise(done => {
4128
+ new this.$mol_after_work(16, () => done(null));
4129
+ });
4130
+ }
4131
+ $.$mol_wait_rest_async = $mol_wait_rest_async;
4132
+ function $mol_wait_rest() {
4133
+ return this.$mol_wire_sync(this).$mol_wait_rest_async();
4134
+ }
4135
+ $.$mol_wait_rest = $mol_wait_rest;
4136
+ })($ || ($ = {}));
4137
+
4138
+ ;
4139
+ "use strict";
4140
+ var $;
4141
+ (function ($_1) {
4142
+ var $$;
4143
+ (function ($$) {
4144
+ $mol_test_mocks.push($ => {
4145
+ $.$mol_wait_timeout = function $mol_wait_timeout_mock(timeout) { };
4146
+ $.$mol_wait_timeout_async = async function $mol_wait_timeout_async_mock(timeout) { };
4147
+ });
4148
+ })($$ = $_1.$$ || ($_1.$$ = {}));
4149
+ })($ || ($ = {}));
4150
+
4089
4151
  ;
4090
4152
  "use strict";
4091
4153
  var $;
@@ -4104,6 +4166,19 @@ var $;
4104
4166
  $.$mol_wait_timeout = $mol_wait_timeout;
4105
4167
  })($ || ($ = {}));
4106
4168
 
4169
+ ;
4170
+ "use strict";
4171
+ var $;
4172
+ (function ($_1) {
4173
+ var $$;
4174
+ (function ($$) {
4175
+ $mol_test_mocks.push($ => {
4176
+ $.$mol_wait_rest = function $mol_wait_rest_mock() { };
4177
+ $.$mol_wait_rest_async = async function $mol_wait_rest_async_mock() { };
4178
+ });
4179
+ })($$ = $_1.$$ || ($_1.$$ = {}));
4180
+ })($ || ($ = {}));
4181
+
4107
4182
  ;
4108
4183
  "use strict";
4109
4184
  var $;