mol_plot_all 1.2.1197 → 1.2.1198
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 +81 -6
- package/node.test.js.map +1 -1
- package/package.json +1 -1
- package/web.test.js +81 -6
- package/web.test.js.map +1 -1
package/package.json
CHANGED
package/web.test.js
CHANGED
|
@@ -1219,7 +1219,7 @@ var $;
|
|
|
1219
1219
|
static last = [];
|
|
1220
1220
|
static send(next) {
|
|
1221
1221
|
$mol_wire_sync(this.first).push(next);
|
|
1222
|
-
|
|
1222
|
+
$$.$mol_wait_timeout(0);
|
|
1223
1223
|
this.last.push(next);
|
|
1224
1224
|
}
|
|
1225
1225
|
}
|
|
@@ -1228,15 +1228,15 @@ var $;
|
|
|
1228
1228
|
const promise = name('jin');
|
|
1229
1229
|
$.$mol_after_mock_warp();
|
|
1230
1230
|
await promise;
|
|
1231
|
-
$
|
|
1232
|
-
$
|
|
1231
|
+
$mol_assert_equal(NameLogger.first, ['john', 'jin']);
|
|
1232
|
+
$mol_assert_equal(NameLogger.last, ['jin']);
|
|
1233
1233
|
},
|
|
1234
1234
|
async 'Latest function calls wins'($) {
|
|
1235
1235
|
const first = [];
|
|
1236
1236
|
const last = [];
|
|
1237
1237
|
function send_name(next) {
|
|
1238
1238
|
$mol_wire_sync(first).push(next);
|
|
1239
|
-
|
|
1239
|
+
$$.$mol_wait_timeout(0);
|
|
1240
1240
|
last.push(next);
|
|
1241
1241
|
}
|
|
1242
1242
|
const name = $mol_wire_async(send_name);
|
|
@@ -1244,8 +1244,8 @@ var $;
|
|
|
1244
1244
|
const promise = name('jin');
|
|
1245
1245
|
$.$mol_after_mock_warp();
|
|
1246
1246
|
await promise;
|
|
1247
|
-
$
|
|
1248
|
-
$
|
|
1247
|
+
$mol_assert_equal(first, ['john', 'jin']);
|
|
1248
|
+
$mol_assert_equal(last, ['jin']);
|
|
1249
1249
|
},
|
|
1250
1250
|
});
|
|
1251
1251
|
})($ || ($ = {}));
|
|
@@ -1341,6 +1341,68 @@ var $;
|
|
|
1341
1341
|
});
|
|
1342
1342
|
})($ || ($ = {}));
|
|
1343
1343
|
|
|
1344
|
+
;
|
|
1345
|
+
"use strict";
|
|
1346
|
+
var $;
|
|
1347
|
+
(function ($) {
|
|
1348
|
+
class $mol_after_work extends $mol_object2 {
|
|
1349
|
+
delay;
|
|
1350
|
+
task;
|
|
1351
|
+
id;
|
|
1352
|
+
constructor(delay, task) {
|
|
1353
|
+
super();
|
|
1354
|
+
this.delay = delay;
|
|
1355
|
+
this.task = task;
|
|
1356
|
+
this.id = requestIdleCallback(task, { timeout: delay });
|
|
1357
|
+
}
|
|
1358
|
+
destructor() {
|
|
1359
|
+
cancelIdleCallback(this.id);
|
|
1360
|
+
}
|
|
1361
|
+
}
|
|
1362
|
+
$.$mol_after_work = $mol_after_work;
|
|
1363
|
+
if (typeof requestIdleCallback !== 'function') {
|
|
1364
|
+
$.$mol_after_work = $mol_after_timeout;
|
|
1365
|
+
}
|
|
1366
|
+
})($ || ($ = {}));
|
|
1367
|
+
|
|
1368
|
+
;
|
|
1369
|
+
"use strict";
|
|
1370
|
+
var $;
|
|
1371
|
+
(function ($_1) {
|
|
1372
|
+
$mol_test_mocks.push($ => {
|
|
1373
|
+
$.$mol_after_work = $mol_after_mock_timeout;
|
|
1374
|
+
});
|
|
1375
|
+
})($ || ($ = {}));
|
|
1376
|
+
|
|
1377
|
+
;
|
|
1378
|
+
"use strict";
|
|
1379
|
+
var $;
|
|
1380
|
+
(function ($) {
|
|
1381
|
+
function $mol_wait_rest_async() {
|
|
1382
|
+
return new Promise(done => {
|
|
1383
|
+
new this.$mol_after_work(16, () => done(null));
|
|
1384
|
+
});
|
|
1385
|
+
}
|
|
1386
|
+
$.$mol_wait_rest_async = $mol_wait_rest_async;
|
|
1387
|
+
function $mol_wait_rest() {
|
|
1388
|
+
return this.$mol_wire_sync(this).$mol_wait_rest_async();
|
|
1389
|
+
}
|
|
1390
|
+
$.$mol_wait_rest = $mol_wait_rest;
|
|
1391
|
+
})($ || ($ = {}));
|
|
1392
|
+
|
|
1393
|
+
;
|
|
1394
|
+
"use strict";
|
|
1395
|
+
var $;
|
|
1396
|
+
(function ($_1) {
|
|
1397
|
+
var $$;
|
|
1398
|
+
(function ($$) {
|
|
1399
|
+
$mol_test_mocks.push($ => {
|
|
1400
|
+
$.$mol_wait_timeout = function $mol_wait_timeout_mock(timeout) { };
|
|
1401
|
+
$.$mol_wait_timeout_async = async function $mol_wait_timeout_async_mock(timeout) { };
|
|
1402
|
+
});
|
|
1403
|
+
})($$ = $_1.$$ || ($_1.$$ = {}));
|
|
1404
|
+
})($ || ($ = {}));
|
|
1405
|
+
|
|
1344
1406
|
;
|
|
1345
1407
|
"use strict";
|
|
1346
1408
|
var $;
|
|
@@ -1359,6 +1421,19 @@ var $;
|
|
|
1359
1421
|
$.$mol_wait_timeout = $mol_wait_timeout;
|
|
1360
1422
|
})($ || ($ = {}));
|
|
1361
1423
|
|
|
1424
|
+
;
|
|
1425
|
+
"use strict";
|
|
1426
|
+
var $;
|
|
1427
|
+
(function ($_1) {
|
|
1428
|
+
var $$;
|
|
1429
|
+
(function ($$) {
|
|
1430
|
+
$mol_test_mocks.push($ => {
|
|
1431
|
+
$.$mol_wait_rest = function $mol_wait_rest_mock() { };
|
|
1432
|
+
$.$mol_wait_rest_async = async function $mol_wait_rest_async_mock() { };
|
|
1433
|
+
});
|
|
1434
|
+
})($$ = $_1.$$ || ($_1.$$ = {}));
|
|
1435
|
+
})($ || ($ = {}));
|
|
1436
|
+
|
|
1362
1437
|
;
|
|
1363
1438
|
"use strict";
|
|
1364
1439
|
var $;
|