mol_dump_lib 0.0.794 → 0.0.795
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.d.ts +4 -4
- package/node.d.ts.map +1 -1
- package/node.deps.json +1 -1
- package/node.js +122 -20
- package/node.js.map +1 -1
- package/node.mjs +122 -20
- package/node.test.js +136 -53
- package/node.test.js.map +1 -1
- package/package.json +3 -3
- package/web.d.ts +4 -4
- package/web.d.ts.map +1 -1
- package/web.deps.json +1 -1
- package/web.js +133 -31
- package/web.js.map +1 -1
- package/web.mjs +133 -31
- package/web.test.js +14 -33
- package/web.test.js.map +1 -1
package/node.mjs
CHANGED
|
@@ -390,6 +390,17 @@ var $;
|
|
|
390
390
|
$.$mol_dev_format_register = $mol_dev_format_register;
|
|
391
391
|
$.$mol_dev_format_head = Symbol('$mol_dev_format_head');
|
|
392
392
|
$.$mol_dev_format_body = Symbol('$mol_dev_format_body');
|
|
393
|
+
function $mol_dev_format_button(label, click) {
|
|
394
|
+
return $mol_dev_format_auto({
|
|
395
|
+
[$.$mol_dev_format_head]() {
|
|
396
|
+
return $mol_dev_format_span({ color: 'cornflowerblue' }, label);
|
|
397
|
+
},
|
|
398
|
+
[$.$mol_dev_format_body]() {
|
|
399
|
+
Promise.resolve().then(click);
|
|
400
|
+
return $mol_dev_format_span({});
|
|
401
|
+
}
|
|
402
|
+
});
|
|
403
|
+
}
|
|
393
404
|
$mol_dev_format_register({
|
|
394
405
|
header: (val, config = false) => {
|
|
395
406
|
if (config)
|
|
@@ -407,13 +418,41 @@ var $;
|
|
|
407
418
|
if (typeof val === 'function') {
|
|
408
419
|
return $mol_dev_format_native(val);
|
|
409
420
|
}
|
|
421
|
+
if (Error.isError(val)) {
|
|
422
|
+
return $mol_dev_format_span({}, $mol_dev_format_native(val), ' ', $mol_dev_format_button('throw', () => $mol_fail_hidden(val)));
|
|
423
|
+
}
|
|
424
|
+
if (val instanceof Promise) {
|
|
425
|
+
return $.$mol_dev_format_shade($mol_dev_format_native(val), ' ', val[Symbol.toStringTag] ?? '');
|
|
426
|
+
}
|
|
410
427
|
if (Symbol.toStringTag in val) {
|
|
411
428
|
return $mol_dev_format_native(val);
|
|
412
429
|
}
|
|
413
430
|
return null;
|
|
414
431
|
},
|
|
415
|
-
hasBody: val =>
|
|
416
|
-
|
|
432
|
+
hasBody: (val, config = false) => {
|
|
433
|
+
if (config)
|
|
434
|
+
return false;
|
|
435
|
+
if (!val)
|
|
436
|
+
return false;
|
|
437
|
+
if (val[$.$mol_dev_format_body])
|
|
438
|
+
return true;
|
|
439
|
+
return false;
|
|
440
|
+
},
|
|
441
|
+
body: (val, config = false) => {
|
|
442
|
+
if (config)
|
|
443
|
+
return null;
|
|
444
|
+
if (!val)
|
|
445
|
+
return null;
|
|
446
|
+
if ($.$mol_dev_format_body in val) {
|
|
447
|
+
try {
|
|
448
|
+
return val[$.$mol_dev_format_body]();
|
|
449
|
+
}
|
|
450
|
+
catch (error) {
|
|
451
|
+
return $.$mol_dev_format_accent($mol_dev_format_native(val), '💨', $mol_dev_format_native(error), '');
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
return null;
|
|
455
|
+
},
|
|
417
456
|
});
|
|
418
457
|
function $mol_dev_format_native(obj) {
|
|
419
458
|
if (typeof obj === 'undefined')
|
|
@@ -479,6 +518,69 @@ var $;
|
|
|
479
518
|
$.$mol_dev_format_indent = $.$mol_dev_format_div.bind(null, {
|
|
480
519
|
'margin-left': '13px'
|
|
481
520
|
});
|
|
521
|
+
class Stack extends Array {
|
|
522
|
+
toString() {
|
|
523
|
+
return this.join('\n');
|
|
524
|
+
}
|
|
525
|
+
}
|
|
526
|
+
class Call extends Object {
|
|
527
|
+
type;
|
|
528
|
+
function;
|
|
529
|
+
method;
|
|
530
|
+
eval;
|
|
531
|
+
source;
|
|
532
|
+
offset;
|
|
533
|
+
pos;
|
|
534
|
+
object;
|
|
535
|
+
flags;
|
|
536
|
+
[Symbol.toStringTag];
|
|
537
|
+
constructor(call) {
|
|
538
|
+
super();
|
|
539
|
+
this.type = call.getTypeName() ?? '';
|
|
540
|
+
this.function = call.getFunctionName() ?? '';
|
|
541
|
+
this.method = call.getMethodName() ?? '';
|
|
542
|
+
if (this.method === this.function)
|
|
543
|
+
this.method = '';
|
|
544
|
+
this.pos = [call.getEnclosingLineNumber() ?? 0, call.getEnclosingColumnNumber() ?? 0];
|
|
545
|
+
this.eval = call.getEvalOrigin() ?? '';
|
|
546
|
+
this.source = call.getScriptNameOrSourceURL() ?? '';
|
|
547
|
+
this.object = call.getThis();
|
|
548
|
+
this.offset = call.getPosition();
|
|
549
|
+
const flags = [];
|
|
550
|
+
if (call.isAsync())
|
|
551
|
+
flags.push('async');
|
|
552
|
+
if (call.isConstructor())
|
|
553
|
+
flags.push('constructor');
|
|
554
|
+
if (call.isEval())
|
|
555
|
+
flags.push('eval');
|
|
556
|
+
if (call.isNative())
|
|
557
|
+
flags.push('native');
|
|
558
|
+
if (call.isPromiseAll())
|
|
559
|
+
flags.push('PromiseAll');
|
|
560
|
+
if (call.isToplevel())
|
|
561
|
+
flags.push('top');
|
|
562
|
+
this.flags = flags;
|
|
563
|
+
const type = this.type ? this.type + '.' : '';
|
|
564
|
+
const func = this.function || '<anon>';
|
|
565
|
+
const method = this.method ? ' [' + this.method + '] ' : '';
|
|
566
|
+
this[Symbol.toStringTag] = `${type}${func}${method}`;
|
|
567
|
+
}
|
|
568
|
+
[Symbol.toPrimitive]() {
|
|
569
|
+
return this.toString();
|
|
570
|
+
}
|
|
571
|
+
toString() {
|
|
572
|
+
const object = this.object || '';
|
|
573
|
+
const label = this[Symbol.toStringTag];
|
|
574
|
+
const source = `${this.source}:${this.pos.join(':')} #${this.offset}`;
|
|
575
|
+
return `\tat ${object}${label} (${source})`;
|
|
576
|
+
}
|
|
577
|
+
[$.$mol_dev_format_head]() {
|
|
578
|
+
return $.$mol_dev_format_div({}, $mol_dev_format_native(this), $.$mol_dev_format_shade(' '), ...this.object ? [
|
|
579
|
+
$mol_dev_format_native(this.object),
|
|
580
|
+
] : [], ...this.method ? [$.$mol_dev_format_shade(' ', ' [', this.method, ']')] : [], $.$mol_dev_format_shade(' ', this.flags.join(', ')));
|
|
581
|
+
}
|
|
582
|
+
}
|
|
583
|
+
Error.prepareStackTrace ??= (error, stack) => new Stack(...stack.map(call => new Call(call)));
|
|
482
584
|
})($ || ($ = {}));
|
|
483
585
|
|
|
484
586
|
;
|
|
@@ -1026,7 +1128,7 @@ var $;
|
|
|
1026
1128
|
if (left instanceof RegExp)
|
|
1027
1129
|
return left.source === right.source && left.flags === right.flags;
|
|
1028
1130
|
if (left instanceof Error)
|
|
1029
|
-
return left.message === right.message && left.stack
|
|
1131
|
+
return left.message === right.message && $mol_compare_deep(left.stack, right.stack);
|
|
1030
1132
|
let left_cache = $.$mol_compare_deep_cache.get(left);
|
|
1031
1133
|
if (left_cache) {
|
|
1032
1134
|
const right_cache = left_cache.get(right);
|
|
@@ -1788,6 +1890,21 @@ var $;
|
|
|
1788
1890
|
$.$mol_fail_catch = $mol_fail_catch;
|
|
1789
1891
|
})($ || ($ = {}));
|
|
1790
1892
|
|
|
1893
|
+
;
|
|
1894
|
+
"use strict";
|
|
1895
|
+
var $;
|
|
1896
|
+
(function ($) {
|
|
1897
|
+
function $mol_try(handler) {
|
|
1898
|
+
try {
|
|
1899
|
+
return handler();
|
|
1900
|
+
}
|
|
1901
|
+
catch (error) {
|
|
1902
|
+
return error;
|
|
1903
|
+
}
|
|
1904
|
+
}
|
|
1905
|
+
$.$mol_try = $mol_try;
|
|
1906
|
+
})($ || ($ = {}));
|
|
1907
|
+
|
|
1791
1908
|
;
|
|
1792
1909
|
"use strict";
|
|
1793
1910
|
var $;
|
|
@@ -1797,7 +1914,7 @@ var $;
|
|
|
1797
1914
|
return false;
|
|
1798
1915
|
if (!$mol_fail_catch(error))
|
|
1799
1916
|
return false;
|
|
1800
|
-
|
|
1917
|
+
$mol_try(() => { $mol_fail_hidden(error); });
|
|
1801
1918
|
return true;
|
|
1802
1919
|
}
|
|
1803
1920
|
$.$mol_fail_log = $mol_fail_log;
|
|
@@ -2101,7 +2218,7 @@ var $;
|
|
|
2101
2218
|
get: () => stack_get() + '\n' + [
|
|
2102
2219
|
this.cause ?? 'no cause',
|
|
2103
2220
|
...this.errors.flatMap(e => [
|
|
2104
|
-
e.stack,
|
|
2221
|
+
String(e.stack),
|
|
2105
2222
|
...e instanceof $mol_error_mix || !e.cause ? [] : [e.cause]
|
|
2106
2223
|
])
|
|
2107
2224
|
].map(frame_normalize).join('\n')
|
|
@@ -6937,21 +7054,6 @@ var $;
|
|
|
6937
7054
|
($mol_mem(($.$mol_dump_value.prototype), "preview_show"));
|
|
6938
7055
|
|
|
6939
7056
|
|
|
6940
|
-
;
|
|
6941
|
-
"use strict";
|
|
6942
|
-
var $;
|
|
6943
|
-
(function ($) {
|
|
6944
|
-
function $mol_try(handler) {
|
|
6945
|
-
try {
|
|
6946
|
-
return handler();
|
|
6947
|
-
}
|
|
6948
|
-
catch (error) {
|
|
6949
|
-
return error;
|
|
6950
|
-
}
|
|
6951
|
-
}
|
|
6952
|
-
$.$mol_try = $mol_try;
|
|
6953
|
-
})($ || ($ = {}));
|
|
6954
|
-
|
|
6955
7057
|
;
|
|
6956
7058
|
"use strict";
|
|
6957
7059
|
|
package/node.test.js
CHANGED
|
@@ -381,6 +381,17 @@ var $;
|
|
|
381
381
|
$.$mol_dev_format_register = $mol_dev_format_register;
|
|
382
382
|
$.$mol_dev_format_head = Symbol('$mol_dev_format_head');
|
|
383
383
|
$.$mol_dev_format_body = Symbol('$mol_dev_format_body');
|
|
384
|
+
function $mol_dev_format_button(label, click) {
|
|
385
|
+
return $mol_dev_format_auto({
|
|
386
|
+
[$.$mol_dev_format_head]() {
|
|
387
|
+
return $mol_dev_format_span({ color: 'cornflowerblue' }, label);
|
|
388
|
+
},
|
|
389
|
+
[$.$mol_dev_format_body]() {
|
|
390
|
+
Promise.resolve().then(click);
|
|
391
|
+
return $mol_dev_format_span({});
|
|
392
|
+
}
|
|
393
|
+
});
|
|
394
|
+
}
|
|
384
395
|
$mol_dev_format_register({
|
|
385
396
|
header: (val, config = false) => {
|
|
386
397
|
if (config)
|
|
@@ -398,13 +409,41 @@ var $;
|
|
|
398
409
|
if (typeof val === 'function') {
|
|
399
410
|
return $mol_dev_format_native(val);
|
|
400
411
|
}
|
|
412
|
+
if (Error.isError(val)) {
|
|
413
|
+
return $mol_dev_format_span({}, $mol_dev_format_native(val), ' ', $mol_dev_format_button('throw', () => $mol_fail_hidden(val)));
|
|
414
|
+
}
|
|
415
|
+
if (val instanceof Promise) {
|
|
416
|
+
return $.$mol_dev_format_shade($mol_dev_format_native(val), ' ', val[Symbol.toStringTag] ?? '');
|
|
417
|
+
}
|
|
401
418
|
if (Symbol.toStringTag in val) {
|
|
402
419
|
return $mol_dev_format_native(val);
|
|
403
420
|
}
|
|
404
421
|
return null;
|
|
405
422
|
},
|
|
406
|
-
hasBody: val =>
|
|
407
|
-
|
|
423
|
+
hasBody: (val, config = false) => {
|
|
424
|
+
if (config)
|
|
425
|
+
return false;
|
|
426
|
+
if (!val)
|
|
427
|
+
return false;
|
|
428
|
+
if (val[$.$mol_dev_format_body])
|
|
429
|
+
return true;
|
|
430
|
+
return false;
|
|
431
|
+
},
|
|
432
|
+
body: (val, config = false) => {
|
|
433
|
+
if (config)
|
|
434
|
+
return null;
|
|
435
|
+
if (!val)
|
|
436
|
+
return null;
|
|
437
|
+
if ($.$mol_dev_format_body in val) {
|
|
438
|
+
try {
|
|
439
|
+
return val[$.$mol_dev_format_body]();
|
|
440
|
+
}
|
|
441
|
+
catch (error) {
|
|
442
|
+
return $.$mol_dev_format_accent($mol_dev_format_native(val), '💨', $mol_dev_format_native(error), '');
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
return null;
|
|
446
|
+
},
|
|
408
447
|
});
|
|
409
448
|
function $mol_dev_format_native(obj) {
|
|
410
449
|
if (typeof obj === 'undefined')
|
|
@@ -470,6 +509,69 @@ var $;
|
|
|
470
509
|
$.$mol_dev_format_indent = $.$mol_dev_format_div.bind(null, {
|
|
471
510
|
'margin-left': '13px'
|
|
472
511
|
});
|
|
512
|
+
class Stack extends Array {
|
|
513
|
+
toString() {
|
|
514
|
+
return this.join('\n');
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
class Call extends Object {
|
|
518
|
+
type;
|
|
519
|
+
function;
|
|
520
|
+
method;
|
|
521
|
+
eval;
|
|
522
|
+
source;
|
|
523
|
+
offset;
|
|
524
|
+
pos;
|
|
525
|
+
object;
|
|
526
|
+
flags;
|
|
527
|
+
[Symbol.toStringTag];
|
|
528
|
+
constructor(call) {
|
|
529
|
+
super();
|
|
530
|
+
this.type = call.getTypeName() ?? '';
|
|
531
|
+
this.function = call.getFunctionName() ?? '';
|
|
532
|
+
this.method = call.getMethodName() ?? '';
|
|
533
|
+
if (this.method === this.function)
|
|
534
|
+
this.method = '';
|
|
535
|
+
this.pos = [call.getEnclosingLineNumber() ?? 0, call.getEnclosingColumnNumber() ?? 0];
|
|
536
|
+
this.eval = call.getEvalOrigin() ?? '';
|
|
537
|
+
this.source = call.getScriptNameOrSourceURL() ?? '';
|
|
538
|
+
this.object = call.getThis();
|
|
539
|
+
this.offset = call.getPosition();
|
|
540
|
+
const flags = [];
|
|
541
|
+
if (call.isAsync())
|
|
542
|
+
flags.push('async');
|
|
543
|
+
if (call.isConstructor())
|
|
544
|
+
flags.push('constructor');
|
|
545
|
+
if (call.isEval())
|
|
546
|
+
flags.push('eval');
|
|
547
|
+
if (call.isNative())
|
|
548
|
+
flags.push('native');
|
|
549
|
+
if (call.isPromiseAll())
|
|
550
|
+
flags.push('PromiseAll');
|
|
551
|
+
if (call.isToplevel())
|
|
552
|
+
flags.push('top');
|
|
553
|
+
this.flags = flags;
|
|
554
|
+
const type = this.type ? this.type + '.' : '';
|
|
555
|
+
const func = this.function || '<anon>';
|
|
556
|
+
const method = this.method ? ' [' + this.method + '] ' : '';
|
|
557
|
+
this[Symbol.toStringTag] = `${type}${func}${method}`;
|
|
558
|
+
}
|
|
559
|
+
[Symbol.toPrimitive]() {
|
|
560
|
+
return this.toString();
|
|
561
|
+
}
|
|
562
|
+
toString() {
|
|
563
|
+
const object = this.object || '';
|
|
564
|
+
const label = this[Symbol.toStringTag];
|
|
565
|
+
const source = `${this.source}:${this.pos.join(':')} #${this.offset}`;
|
|
566
|
+
return `\tat ${object}${label} (${source})`;
|
|
567
|
+
}
|
|
568
|
+
[$.$mol_dev_format_head]() {
|
|
569
|
+
return $.$mol_dev_format_div({}, $mol_dev_format_native(this), $.$mol_dev_format_shade(' '), ...this.object ? [
|
|
570
|
+
$mol_dev_format_native(this.object),
|
|
571
|
+
] : [], ...this.method ? [$.$mol_dev_format_shade(' ', ' [', this.method, ']')] : [], $.$mol_dev_format_shade(' ', this.flags.join(', ')));
|
|
572
|
+
}
|
|
573
|
+
}
|
|
574
|
+
Error.prepareStackTrace ??= (error, stack) => new Stack(...stack.map(call => new Call(call)));
|
|
473
575
|
})($ || ($ = {}));
|
|
474
576
|
|
|
475
577
|
;
|
|
@@ -1017,7 +1119,7 @@ var $;
|
|
|
1017
1119
|
if (left instanceof RegExp)
|
|
1018
1120
|
return left.source === right.source && left.flags === right.flags;
|
|
1019
1121
|
if (left instanceof Error)
|
|
1020
|
-
return left.message === right.message && left.stack
|
|
1122
|
+
return left.message === right.message && $mol_compare_deep(left.stack, right.stack);
|
|
1021
1123
|
let left_cache = $.$mol_compare_deep_cache.get(left);
|
|
1022
1124
|
if (left_cache) {
|
|
1023
1125
|
const right_cache = left_cache.get(right);
|
|
@@ -1779,6 +1881,21 @@ var $;
|
|
|
1779
1881
|
$.$mol_fail_catch = $mol_fail_catch;
|
|
1780
1882
|
})($ || ($ = {}));
|
|
1781
1883
|
|
|
1884
|
+
;
|
|
1885
|
+
"use strict";
|
|
1886
|
+
var $;
|
|
1887
|
+
(function ($) {
|
|
1888
|
+
function $mol_try(handler) {
|
|
1889
|
+
try {
|
|
1890
|
+
return handler();
|
|
1891
|
+
}
|
|
1892
|
+
catch (error) {
|
|
1893
|
+
return error;
|
|
1894
|
+
}
|
|
1895
|
+
}
|
|
1896
|
+
$.$mol_try = $mol_try;
|
|
1897
|
+
})($ || ($ = {}));
|
|
1898
|
+
|
|
1782
1899
|
;
|
|
1783
1900
|
"use strict";
|
|
1784
1901
|
var $;
|
|
@@ -1788,7 +1905,7 @@ var $;
|
|
|
1788
1905
|
return false;
|
|
1789
1906
|
if (!$mol_fail_catch(error))
|
|
1790
1907
|
return false;
|
|
1791
|
-
|
|
1908
|
+
$mol_try(() => { $mol_fail_hidden(error); });
|
|
1792
1909
|
return true;
|
|
1793
1910
|
}
|
|
1794
1911
|
$.$mol_fail_log = $mol_fail_log;
|
|
@@ -2092,7 +2209,7 @@ var $;
|
|
|
2092
2209
|
get: () => stack_get() + '\n' + [
|
|
2093
2210
|
this.cause ?? 'no cause',
|
|
2094
2211
|
...this.errors.flatMap(e => [
|
|
2095
|
-
e.stack,
|
|
2212
|
+
String(e.stack),
|
|
2096
2213
|
...e instanceof $mol_error_mix || !e.cause ? [] : [e.cause]
|
|
2097
2214
|
])
|
|
2098
2215
|
].map(frame_normalize).join('\n')
|
|
@@ -6928,21 +7045,6 @@ var $;
|
|
|
6928
7045
|
($mol_mem(($.$mol_dump_value.prototype), "preview_show"));
|
|
6929
7046
|
|
|
6930
7047
|
|
|
6931
|
-
;
|
|
6932
|
-
"use strict";
|
|
6933
|
-
var $;
|
|
6934
|
-
(function ($) {
|
|
6935
|
-
function $mol_try(handler) {
|
|
6936
|
-
try {
|
|
6937
|
-
return handler();
|
|
6938
|
-
}
|
|
6939
|
-
catch (error) {
|
|
6940
|
-
return error;
|
|
6941
|
-
}
|
|
6942
|
-
}
|
|
6943
|
-
$.$mol_try = $mol_try;
|
|
6944
|
-
})($ || ($ = {}));
|
|
6945
|
-
|
|
6946
7048
|
;
|
|
6947
7049
|
"use strict";
|
|
6948
7050
|
|
|
@@ -7212,6 +7314,17 @@ var $;
|
|
|
7212
7314
|
$.$mol_test_complete = $mol_test_complete;
|
|
7213
7315
|
})($ || ($ = {}));
|
|
7214
7316
|
|
|
7317
|
+
;
|
|
7318
|
+
"use strict";
|
|
7319
|
+
var $;
|
|
7320
|
+
(function ($) {
|
|
7321
|
+
$mol_test({
|
|
7322
|
+
'return result without errors'() {
|
|
7323
|
+
$mol_assert_equal($mol_try(() => false), false);
|
|
7324
|
+
},
|
|
7325
|
+
});
|
|
7326
|
+
})($ || ($ = {}));
|
|
7327
|
+
|
|
7215
7328
|
;
|
|
7216
7329
|
"use strict";
|
|
7217
7330
|
var $;
|
|
@@ -7921,7 +8034,7 @@ var $;
|
|
|
7921
8034
|
catch (error) {
|
|
7922
8035
|
$.$mol_fail = fail;
|
|
7923
8036
|
if (typeof ErrorRight === 'string') {
|
|
7924
|
-
$mol_assert_equal(error.message, ErrorRight);
|
|
8037
|
+
$mol_assert_equal(error.message ?? error, ErrorRight);
|
|
7925
8038
|
}
|
|
7926
8039
|
else {
|
|
7927
8040
|
$mol_assert_equal(error instanceof ErrorRight, true);
|
|
@@ -7945,7 +8058,7 @@ var $;
|
|
|
7945
8058
|
continue;
|
|
7946
8059
|
if (!$mol_compare_deep(args[i], args[j]))
|
|
7947
8060
|
continue;
|
|
7948
|
-
$mol_fail(new Error(`
|
|
8061
|
+
return $mol_fail(new Error(`Uniquesess assertion failure`, { cause: { [i]: args[i], [i]: args[i] } }));
|
|
7949
8062
|
}
|
|
7950
8063
|
}
|
|
7951
8064
|
}
|
|
@@ -7956,29 +8069,10 @@ var $;
|
|
|
7956
8069
|
continue;
|
|
7957
8070
|
if (args[0] instanceof $mol_dom_context.Element && args[i] instanceof $mol_dom_context.Element && args[0].outerHTML === args[i].outerHTML)
|
|
7958
8071
|
continue;
|
|
7959
|
-
return $mol_fail(new Error(`args[0]
|
|
8072
|
+
return $mol_fail(new Error(`Equality assertion failure`, { cause: { 0: args[0], [i]: args[i] } }));
|
|
7960
8073
|
}
|
|
7961
8074
|
}
|
|
7962
8075
|
$.$mol_assert_equal = $mol_assert_equal;
|
|
7963
|
-
const print = (val) => {
|
|
7964
|
-
if (!val)
|
|
7965
|
-
return val;
|
|
7966
|
-
if (typeof val === 'bigint')
|
|
7967
|
-
return String(val) + 'n';
|
|
7968
|
-
if (typeof val === 'symbol')
|
|
7969
|
-
return `Symbol(${val.description})`;
|
|
7970
|
-
if (typeof val !== 'object')
|
|
7971
|
-
return val;
|
|
7972
|
-
if ('outerHTML' in val)
|
|
7973
|
-
return val.outerHTML;
|
|
7974
|
-
try {
|
|
7975
|
-
return JSON.stringify(val, (k, v) => typeof v === 'bigint' ? String(v) : v, '\t');
|
|
7976
|
-
}
|
|
7977
|
-
catch (error) {
|
|
7978
|
-
console.error(error);
|
|
7979
|
-
return val;
|
|
7980
|
-
}
|
|
7981
|
-
};
|
|
7982
8076
|
})($ || ($ = {}));
|
|
7983
8077
|
|
|
7984
8078
|
;
|
|
@@ -10677,16 +10771,5 @@ var $;
|
|
|
10677
10771
|
});
|
|
10678
10772
|
})($ || ($ = {}));
|
|
10679
10773
|
|
|
10680
|
-
;
|
|
10681
|
-
"use strict";
|
|
10682
|
-
var $;
|
|
10683
|
-
(function ($) {
|
|
10684
|
-
$mol_test({
|
|
10685
|
-
'return result without errors'() {
|
|
10686
|
-
$mol_assert_equal($mol_try(() => false), false);
|
|
10687
|
-
},
|
|
10688
|
-
});
|
|
10689
|
-
})($ || ($ = {}));
|
|
10690
|
-
|
|
10691
10774
|
|
|
10692
10775
|
//# sourceMappingURL=node.test.js.map
|