mol_dump_lib 0.0.516 → 0.0.518

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_dump_lib",
3
- "version": "0.0.516",
3
+ "version": "0.0.518",
4
4
  "exports": {
5
5
  "node": {
6
6
  "import": "./node.mjs",
package/web.test.js CHANGED
@@ -1213,7 +1213,7 @@ var $;
1213
1213
  static last = [];
1214
1214
  static send(next) {
1215
1215
  $mol_wire_sync(this.first).push(next);
1216
- this.$.$mol_wait_timeout(0);
1216
+ $$.$mol_wait_timeout(0);
1217
1217
  this.last.push(next);
1218
1218
  }
1219
1219
  }
@@ -1222,15 +1222,15 @@ var $;
1222
1222
  const promise = name('jin');
1223
1223
  $.$mol_after_mock_warp();
1224
1224
  await promise;
1225
- $mol_assert_like(NameLogger.first, ['john', 'jin']);
1226
- $mol_assert_like(NameLogger.last, ['jin']);
1225
+ $mol_assert_equal(NameLogger.first, ['john', 'jin']);
1226
+ $mol_assert_equal(NameLogger.last, ['jin']);
1227
1227
  },
1228
1228
  async 'Latest function calls wins'($) {
1229
1229
  const first = [];
1230
1230
  const last = [];
1231
1231
  function send_name(next) {
1232
1232
  $mol_wire_sync(first).push(next);
1233
- $.$mol_wait_timeout(0);
1233
+ $$.$mol_wait_timeout(0);
1234
1234
  last.push(next);
1235
1235
  }
1236
1236
  const name = $mol_wire_async(send_name);
@@ -1238,8 +1238,8 @@ var $;
1238
1238
  const promise = name('jin');
1239
1239
  $.$mol_after_mock_warp();
1240
1240
  await promise;
1241
- $mol_assert_like(first, ['john', 'jin']);
1242
- $mol_assert_like(last, ['jin']);
1241
+ $mol_assert_equal(first, ['john', 'jin']);
1242
+ $mol_assert_equal(last, ['jin']);
1243
1243
  },
1244
1244
  });
1245
1245
  })($ || ($ = {}));
@@ -1297,6 +1297,68 @@ var $;
1297
1297
  });
1298
1298
  })($ || ($ = {}));
1299
1299
 
1300
+ ;
1301
+ "use strict";
1302
+ var $;
1303
+ (function ($) {
1304
+ class $mol_after_work extends $mol_object2 {
1305
+ delay;
1306
+ task;
1307
+ id;
1308
+ constructor(delay, task) {
1309
+ super();
1310
+ this.delay = delay;
1311
+ this.task = task;
1312
+ this.id = requestIdleCallback(task, { timeout: delay });
1313
+ }
1314
+ destructor() {
1315
+ cancelIdleCallback(this.id);
1316
+ }
1317
+ }
1318
+ $.$mol_after_work = $mol_after_work;
1319
+ if (typeof requestIdleCallback !== 'function') {
1320
+ $.$mol_after_work = $mol_after_timeout;
1321
+ }
1322
+ })($ || ($ = {}));
1323
+
1324
+ ;
1325
+ "use strict";
1326
+ var $;
1327
+ (function ($_1) {
1328
+ $mol_test_mocks.push($ => {
1329
+ $.$mol_after_work = $mol_after_mock_timeout;
1330
+ });
1331
+ })($ || ($ = {}));
1332
+
1333
+ ;
1334
+ "use strict";
1335
+ var $;
1336
+ (function ($) {
1337
+ function $mol_wait_rest_async() {
1338
+ return new Promise(done => {
1339
+ new this.$mol_after_work(16, () => done(null));
1340
+ });
1341
+ }
1342
+ $.$mol_wait_rest_async = $mol_wait_rest_async;
1343
+ function $mol_wait_rest() {
1344
+ return this.$mol_wire_sync(this).$mol_wait_rest_async();
1345
+ }
1346
+ $.$mol_wait_rest = $mol_wait_rest;
1347
+ })($ || ($ = {}));
1348
+
1349
+ ;
1350
+ "use strict";
1351
+ var $;
1352
+ (function ($_1) {
1353
+ var $$;
1354
+ (function ($$) {
1355
+ $mol_test_mocks.push($ => {
1356
+ $.$mol_wait_timeout = function $mol_wait_timeout_mock(timeout) { };
1357
+ $.$mol_wait_timeout_async = async function $mol_wait_timeout_async_mock(timeout) { };
1358
+ });
1359
+ })($$ = $_1.$$ || ($_1.$$ = {}));
1360
+ })($ || ($ = {}));
1361
+
1300
1362
  ;
1301
1363
  "use strict";
1302
1364
  var $;
@@ -1315,6 +1377,19 @@ var $;
1315
1377
  $.$mol_wait_timeout = $mol_wait_timeout;
1316
1378
  })($ || ($ = {}));
1317
1379
 
1380
+ ;
1381
+ "use strict";
1382
+ var $;
1383
+ (function ($_1) {
1384
+ var $$;
1385
+ (function ($$) {
1386
+ $mol_test_mocks.push($ => {
1387
+ $.$mol_wait_rest = function $mol_wait_rest_mock() { };
1388
+ $.$mol_wait_rest_async = async function $mol_wait_rest_async_mock() { };
1389
+ });
1390
+ })($$ = $_1.$$ || ($_1.$$ = {}));
1391
+ })($ || ($ = {}));
1392
+
1318
1393
  ;
1319
1394
  "use strict";
1320
1395
  var $;