mol_time_all 1.1.500 → 1.1.502

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
@@ -1,4 +1,12 @@
1
1
  "use strict";
2
+ "use strict";
3
+ Error.stackTraceLimit = 50;
4
+ var $;
5
+ (function ($) {
6
+ })($ || ($ = {}));
7
+ module.exports = $;
8
+ //mam.ts
9
+ ;
2
10
  "use strict"
3
11
 
4
12
  var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
@@ -11,14 +19,6 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
11
19
  var $ = ( typeof module === 'object' ) ? ( module['export'+'s'] = globalThis ) : globalThis
12
20
  $.$$ = $
13
21
 
14
- ;
15
- "use strict";
16
- Error.stackTraceLimit = 50;
17
- var $;
18
- (function ($) {
19
- })($ || ($ = {}));
20
- module.exports = $;
21
- //mam.ts
22
22
  ;
23
23
  "use strict";
24
24
  var $;
@@ -665,16 +665,6 @@ var $;
665
665
  ;
666
666
  "use strict";
667
667
  var $;
668
- (function ($) {
669
- function $mol_test_complete() {
670
- process.exit(0);
671
- }
672
- $.$mol_test_complete = $mol_test_complete;
673
- })($ || ($ = {}));
674
- //mol/test/test.node.test.ts
675
- ;
676
- "use strict";
677
- var $;
678
668
  (function ($_1) {
679
669
  function $mol_test(set) {
680
670
  for (let name in set) {
@@ -762,6 +752,16 @@ var $;
762
752
  ;
763
753
  "use strict";
764
754
  var $;
755
+ (function ($) {
756
+ function $mol_test_complete() {
757
+ process.exit(0);
758
+ }
759
+ $.$mol_test_complete = $mol_test_complete;
760
+ })($ || ($ = {}));
761
+ //mol/test/test.node.test.ts
762
+ ;
763
+ "use strict";
764
+ var $;
765
765
  (function ($) {
766
766
  })($ || ($ = {}));
767
767
  //mol/dom/context/context.ts
@@ -1030,112 +1030,16 @@ var $;
1030
1030
  //mol/type/error/error.ts
1031
1031
  ;
1032
1032
  "use strict";
1033
- //mol/type/assert/assert.test.ts
1034
- ;
1035
- "use strict";
1036
1033
  //mol/type/assert/assert.ts
1037
1034
  ;
1038
1035
  "use strict";
1039
- //mol/type/equals/equals.test.ts
1040
- ;
1041
- "use strict";
1042
- //mol/type/equals/equals.ts
1043
- ;
1044
- "use strict";
1045
- //mol/type/partial/deep/deep.test.ts
1036
+ //mol/type/assert/assert.test.ts
1046
1037
  ;
1047
1038
  "use strict";
1048
1039
  //mol/type/partial/deep/deep.ts
1049
1040
  ;
1050
1041
  "use strict";
1051
- var $;
1052
- (function ($) {
1053
- $mol_test({
1054
- 'Make empty div'() {
1055
- $mol_assert_equal(($mol_jsx("div", null)).outerHTML, '<div></div>');
1056
- },
1057
- 'Define native field'() {
1058
- const dom = $mol_jsx("input", { value: '123' });
1059
- $mol_assert_equal(dom.outerHTML, '<input value="123">');
1060
- $mol_assert_equal(dom.value, '123');
1061
- },
1062
- 'Define classes'() {
1063
- const dom = $mol_jsx("div", { class: 'foo bar' });
1064
- $mol_assert_equal(dom.outerHTML, '<div class="foo bar"></div>');
1065
- },
1066
- 'Define styles'() {
1067
- const dom = $mol_jsx("div", { style: { color: 'red' } });
1068
- $mol_assert_equal(dom.outerHTML, '<div style="color: red;"></div>');
1069
- },
1070
- 'Define dataset'() {
1071
- const dom = $mol_jsx("div", { dataset: { foo: 'bar' } });
1072
- $mol_assert_equal(dom.outerHTML, '<div data-foo="bar"></div>');
1073
- },
1074
- 'Define attributes'() {
1075
- const dom = $mol_jsx("div", { lang: "ru", hidden: true });
1076
- $mol_assert_equal(dom.outerHTML, '<div lang="ru" hidden=""></div>');
1077
- },
1078
- 'Define child nodes'() {
1079
- const dom = $mol_jsx("div", null,
1080
- "hello",
1081
- $mol_jsx("strong", null, "world"),
1082
- "!");
1083
- $mol_assert_equal(dom.outerHTML, '<div>hello<strong>world</strong>!</div>');
1084
- },
1085
- 'Function as component'() {
1086
- const Button = (props, target) => {
1087
- return $mol_jsx("button", { title: props.hint }, target());
1088
- };
1089
- const dom = $mol_jsx(Button, { id: "foo", hint: "click me" }, () => 'hey!');
1090
- $mol_assert_equal(dom.outerHTML, '<button id="foo" title="click me" class="Button">hey!</button>');
1091
- },
1092
- 'Nested guid generation'() {
1093
- const Foo = () => {
1094
- return $mol_jsx("div", null,
1095
- $mol_jsx(Bar, { id: "bar" },
1096
- $mol_jsx("img", { id: "icon" })));
1097
- };
1098
- const Bar = (props, icon) => {
1099
- return $mol_jsx("span", null,
1100
- icon,
1101
- $mol_jsx("i", { id: "label" }));
1102
- };
1103
- const dom = $mol_jsx(Foo, { id: "foo" });
1104
- $mol_assert_equal(dom.outerHTML, '<div id="foo" class="Foo"><span id="foo/bar" class="Foo_bar Bar"><img id="foo/icon" class="Foo_icon"><i id="foo/bar/label" class="Foo_bar_label Bar_label"></i></span></div>');
1105
- },
1106
- 'Fail on non unique ids'() {
1107
- const App = () => {
1108
- return $mol_jsx("div", null,
1109
- $mol_jsx("span", { id: "bar" }),
1110
- $mol_jsx("span", { id: "bar" }));
1111
- };
1112
- $mol_assert_fail(() => $mol_jsx(App, { id: "foo" }), 'JSX already has tag with id "foo/bar"');
1113
- },
1114
- 'Owner based guid generationn'() {
1115
- const Foo = () => {
1116
- return $mol_jsx("div", null,
1117
- $mol_jsx(Bar, { id: "middle", icon: () => $mol_jsx("img", { id: "icon" }) }));
1118
- };
1119
- const Bar = (props) => {
1120
- return $mol_jsx("span", null, props.icon());
1121
- };
1122
- const dom = $mol_jsx(Foo, { id: "app" });
1123
- $mol_assert_equal(dom.outerHTML, '<div id="app" class="Foo"><span id="app/middle" class="Foo_middle Bar"><img id="app/icon" class="Foo_icon"></span></div>');
1124
- },
1125
- 'Fail on same ids from different caller'() {
1126
- const Foo = () => {
1127
- return $mol_jsx("div", null,
1128
- $mol_jsx("img", { id: "icon" }),
1129
- $mol_jsx(Bar, { id: "bar", icon: () => $mol_jsx("img", { id: "icon" }) }));
1130
- };
1131
- const Bar = (props) => {
1132
- return $mol_jsx("span", null, props.icon());
1133
- };
1134
- $mol_assert_fail(() => $mol_jsx(Foo, { id: "foo" }), 'JSX already has tag with id "foo/icon"');
1135
- },
1136
- });
1137
- })($ || ($ = {}));
1138
- //mol/jsx/jsx.test.tsx
1042
+ //mol/type/partial/deep/deep.test.ts
1139
1043
  ;
1140
1044
  "use strict";
1141
1045
  var $;
@@ -1262,97 +1166,91 @@ var $;
1262
1166
  var $;
1263
1167
  (function ($) {
1264
1168
  $mol_test({
1265
- 'nulls & undefineds'() {
1266
- $mol_assert_ok($mol_compare_deep(null, null));
1267
- $mol_assert_ok($mol_compare_deep(undefined, undefined));
1268
- $mol_assert_not($mol_compare_deep(undefined, null));
1269
- $mol_assert_not($mol_compare_deep({}, null));
1169
+ 'Make empty div'() {
1170
+ $mol_assert_equal(($mol_jsx("div", null)).outerHTML, '<div></div>');
1270
1171
  },
1271
- 'number'() {
1272
- $mol_assert_ok($mol_compare_deep(1, 1));
1273
- $mol_assert_ok($mol_compare_deep(Number.NaN, Number.NaN));
1274
- $mol_assert_not($mol_compare_deep(1, 2));
1275
- $mol_assert_ok($mol_compare_deep(Object(1), Object(1)));
1276
- $mol_assert_not($mol_compare_deep(Object(1), Object(2)));
1172
+ 'Define native field'() {
1173
+ const dom = $mol_jsx("input", { value: '123' });
1174
+ $mol_assert_equal(dom.outerHTML, '<input value="123">');
1175
+ $mol_assert_equal(dom.value, '123');
1277
1176
  },
1278
- 'POJO'() {
1279
- $mol_assert_ok($mol_compare_deep({}, {}));
1280
- $mol_assert_not($mol_compare_deep({ a: 1 }, { b: 2 }));
1281
- $mol_assert_not($mol_compare_deep({ a: 1 }, { a: 2 }));
1282
- $mol_assert_not($mol_compare_deep({}, { a: undefined }));
1283
- $mol_assert_ok($mol_compare_deep({ a: 1, b: 2 }, { b: 2, a: 1 }));
1284
- $mol_assert_ok($mol_compare_deep({ a: { b: 1 } }, { a: { b: 1 } }));
1177
+ 'Define classes'() {
1178
+ const dom = $mol_jsx("div", { class: 'foo bar' });
1179
+ $mol_assert_equal(dom.outerHTML, '<div class="foo bar"></div>');
1285
1180
  },
1286
- 'Array'() {
1287
- $mol_assert_ok($mol_compare_deep([], []));
1288
- $mol_assert_ok($mol_compare_deep([1, [2]], [1, [2]]));
1289
- $mol_assert_not($mol_compare_deep([1, 2], [1, 3]));
1290
- $mol_assert_not($mol_compare_deep([1, 2,], [1, 3, undefined]));
1181
+ 'Define styles'() {
1182
+ const dom = $mol_jsx("div", { style: { color: 'red' } });
1183
+ $mol_assert_equal(dom.outerHTML, '<div style="color: red;"></div>');
1291
1184
  },
1292
- 'Non POJO are different'() {
1293
- class Thing extends Object {
1294
- }
1295
- $mol_assert_not($mol_compare_deep(new Thing, new Thing));
1296
- $mol_assert_not($mol_compare_deep(() => 1, () => 1));
1297
- $mol_assert_not($mol_compare_deep(new RangeError('Test error'), new RangeError('Test error')));
1185
+ 'Define dataset'() {
1186
+ const dom = $mol_jsx("div", { dataset: { foo: 'bar' } });
1187
+ $mol_assert_equal(dom.outerHTML, '<div data-foo="bar"></div>');
1298
1188
  },
1299
- 'same POJOs with cyclic reference'() {
1300
- const a = { foo: {} };
1301
- a['self'] = a;
1302
- const b = { foo: {} };
1303
- b['self'] = b;
1304
- $mol_assert_ok($mol_compare_deep(a, b));
1189
+ 'Define attributes'() {
1190
+ const dom = $mol_jsx("div", { lang: "ru", hidden: true });
1191
+ $mol_assert_equal(dom.outerHTML, '<div lang="ru" hidden=""></div>');
1305
1192
  },
1306
- 'Date'() {
1307
- $mol_assert_ok($mol_compare_deep(new Date(12345), new Date(12345)));
1308
- $mol_assert_not($mol_compare_deep(new Date(12345), new Date(12346)));
1193
+ 'Define child nodes'() {
1194
+ const dom = $mol_jsx("div", null,
1195
+ "hello",
1196
+ $mol_jsx("strong", null, "world"),
1197
+ "!");
1198
+ $mol_assert_equal(dom.outerHTML, '<div>hello<strong>world</strong>!</div>');
1309
1199
  },
1310
- 'RegExp'() {
1311
- $mol_assert_ok($mol_compare_deep(/\x22/mig, /\x22/mig));
1312
- $mol_assert_not($mol_compare_deep(/\x22/mig, /\x21/mig));
1313
- $mol_assert_not($mol_compare_deep(/\x22/mig, /\x22/mg));
1200
+ 'Function as component'() {
1201
+ const Button = (props, target) => {
1202
+ return $mol_jsx("button", { title: props.hint }, target());
1203
+ };
1204
+ const dom = $mol_jsx(Button, { id: "foo", hint: "click me" }, () => 'hey!');
1205
+ $mol_assert_equal(dom.outerHTML, '<button id="foo" title="click me" class="Button">hey!</button>');
1314
1206
  },
1315
- 'Error'() {
1316
- $mol_assert_not($mol_compare_deep(new Error('xxx'), new Error('xxx')));
1317
- const fail = (message) => new Error(message);
1318
- $mol_assert_ok($mol_compare_deep(...['xxx', 'xxx'].map(msg => new Error(msg))));
1319
- $mol_assert_not($mol_compare_deep(...['xxx', 'yyy'].map(msg => new Error(msg))));
1207
+ 'Nested guid generation'() {
1208
+ const Foo = () => {
1209
+ return $mol_jsx("div", null,
1210
+ $mol_jsx(Bar, { id: "bar" },
1211
+ $mol_jsx("img", { id: "icon" })));
1212
+ };
1213
+ const Bar = (props, icon) => {
1214
+ return $mol_jsx("span", null,
1215
+ icon,
1216
+ $mol_jsx("i", { id: "label" }));
1217
+ };
1218
+ const dom = $mol_jsx(Foo, { id: "foo" });
1219
+ $mol_assert_equal(dom.outerHTML, '<div id="foo" class="Foo"><span id="foo/bar" class="Foo_bar Bar"><img id="foo/icon" class="Foo_icon"><i id="foo/bar/label" class="Foo_bar_label Bar_label"></i></span></div>');
1320
1220
  },
1321
- 'Map'() {
1322
- $mol_assert_ok($mol_compare_deep(new Map, new Map));
1323
- $mol_assert_ok($mol_compare_deep(new Map([[1, [2]]]), new Map([[1, [2]]])));
1324
- $mol_assert_ok($mol_compare_deep(new Map([[[1], 2]]), new Map([[[1], 2]])));
1325
- $mol_assert_not($mol_compare_deep(new Map([[1, 2]]), new Map([[1, 3]])));
1326
- $mol_assert_not($mol_compare_deep(new Map([[[1], 2]]), new Map([[[3], 2]])));
1221
+ 'Fail on non unique ids'() {
1222
+ const App = () => {
1223
+ return $mol_jsx("div", null,
1224
+ $mol_jsx("span", { id: "bar" }),
1225
+ $mol_jsx("span", { id: "bar" }));
1226
+ };
1227
+ $mol_assert_fail(() => $mol_jsx(App, { id: "foo" }), 'JSX already has tag with id "foo/bar"');
1327
1228
  },
1328
- 'Set'() {
1329
- $mol_assert_ok($mol_compare_deep(new Set, new Set));
1330
- $mol_assert_ok($mol_compare_deep(new Set([1, [2]]), new Set([1, [2]])));
1331
- $mol_assert_not($mol_compare_deep(new Set([1]), new Set([2])));
1229
+ 'Owner based guid generationn'() {
1230
+ const Foo = () => {
1231
+ return $mol_jsx("div", null,
1232
+ $mol_jsx(Bar, { id: "middle", icon: () => $mol_jsx("img", { id: "icon" }) }));
1233
+ };
1234
+ const Bar = (props) => {
1235
+ return $mol_jsx("span", null, props.icon());
1236
+ };
1237
+ const dom = $mol_jsx(Foo, { id: "app" });
1238
+ $mol_assert_equal(dom.outerHTML, '<div id="app" class="Foo"><span id="app/middle" class="Foo_middle Bar"><img id="app/icon" class="Foo_icon"></span></div>');
1332
1239
  },
1333
- 'Uint8Array'() {
1334
- $mol_assert_ok($mol_compare_deep(new Uint8Array, new Uint8Array));
1335
- $mol_assert_ok($mol_compare_deep(new Uint8Array([0]), new Uint8Array([0])));
1336
- $mol_assert_not($mol_compare_deep(new Uint8Array([0]), new Uint8Array([1])));
1337
- },
1338
- 'Custom comparator'() {
1339
- class User {
1340
- name;
1341
- rand;
1342
- constructor(name, rand = Math.random()) {
1343
- this.name = name;
1344
- this.rand = rand;
1345
- }
1346
- [Symbol.toPrimitive](mode) {
1347
- return this.name;
1348
- }
1349
- }
1350
- $mol_assert_ok($mol_compare_deep(new User('Jin'), new User('Jin')));
1351
- $mol_assert_not($mol_compare_deep(new User('Jin'), new User('John')));
1240
+ 'Fail on same ids from different caller'() {
1241
+ const Foo = () => {
1242
+ return $mol_jsx("div", null,
1243
+ $mol_jsx("img", { id: "icon" }),
1244
+ $mol_jsx(Bar, { id: "bar", icon: () => $mol_jsx("img", { id: "icon" }) }));
1245
+ };
1246
+ const Bar = (props) => {
1247
+ return $mol_jsx("span", null, props.icon());
1248
+ };
1249
+ $mol_assert_fail(() => $mol_jsx(Foo, { id: "foo" }), 'JSX already has tag with id "foo/icon"');
1352
1250
  },
1353
1251
  });
1354
1252
  })($ || ($ = {}));
1355
- //mol/compare/deep/deep.test.tsx
1253
+ //mol/jsx/jsx.test.tsx
1356
1254
  ;
1357
1255
  "use strict";
1358
1256
  var $;
@@ -1481,46 +1379,110 @@ var $;
1481
1379
  ;
1482
1380
  "use strict";
1483
1381
  var $;
1484
- (function ($) {
1485
- function $mol_dom_serialize(node) {
1486
- const serializer = new $mol_dom_context.XMLSerializer;
1487
- return serializer.serializeToString(node);
1488
- }
1489
- $.$mol_dom_serialize = $mol_dom_serialize;
1490
- })($ || ($ = {}));
1491
- //mol/dom/serialize/serialize.ts
1492
- ;
1493
- "use strict";
1494
- var $;
1495
1382
  (function ($) {
1496
1383
  $mol_test({
1497
- 'must be false'() {
1498
- $mol_assert_not(0);
1384
+ 'nulls & undefineds'() {
1385
+ $mol_assert_ok($mol_compare_deep(null, null));
1386
+ $mol_assert_ok($mol_compare_deep(undefined, undefined));
1387
+ $mol_assert_not($mol_compare_deep(undefined, null));
1388
+ $mol_assert_not($mol_compare_deep({}, null));
1499
1389
  },
1500
- 'must be true'() {
1501
- $mol_assert_ok(1);
1390
+ 'number'() {
1391
+ $mol_assert_ok($mol_compare_deep(1, 1));
1392
+ $mol_assert_ok($mol_compare_deep(Number.NaN, Number.NaN));
1393
+ $mol_assert_not($mol_compare_deep(1, 2));
1394
+ $mol_assert_ok($mol_compare_deep(Object(1), Object(1)));
1395
+ $mol_assert_not($mol_compare_deep(Object(1), Object(2)));
1502
1396
  },
1503
- 'two must be equal'() {
1504
- $mol_assert_equal(2, 2);
1397
+ 'POJO'() {
1398
+ $mol_assert_ok($mol_compare_deep({}, {}));
1399
+ $mol_assert_not($mol_compare_deep({ a: 1 }, { b: 2 }));
1400
+ $mol_assert_not($mol_compare_deep({ a: 1 }, { a: 2 }));
1401
+ $mol_assert_not($mol_compare_deep({}, { a: undefined }));
1402
+ $mol_assert_ok($mol_compare_deep({ a: 1, b: 2 }, { b: 2, a: 1 }));
1403
+ $mol_assert_ok($mol_compare_deep({ a: { b: 1 } }, { a: { b: 1 } }));
1505
1404
  },
1506
- 'three must be equal'() {
1507
- $mol_assert_equal(2, 2, 2);
1405
+ 'Array'() {
1406
+ $mol_assert_ok($mol_compare_deep([], []));
1407
+ $mol_assert_ok($mol_compare_deep([1, [2]], [1, [2]]));
1408
+ $mol_assert_not($mol_compare_deep([1, 2], [1, 3]));
1409
+ $mol_assert_not($mol_compare_deep([1, 2,], [1, 3, undefined]));
1508
1410
  },
1509
- 'two must be unique'() {
1510
- $mol_assert_unique([3], [3]);
1411
+ 'Non POJO are different'() {
1412
+ class Thing extends Object {
1413
+ }
1414
+ $mol_assert_not($mol_compare_deep(new Thing, new Thing));
1415
+ $mol_assert_not($mol_compare_deep(() => 1, () => 1));
1416
+ $mol_assert_not($mol_compare_deep(new RangeError('Test error'), new RangeError('Test error')));
1511
1417
  },
1512
- 'three must be unique'() {
1513
- $mol_assert_unique([3], [3], [3]);
1418
+ 'same POJOs with cyclic reference'() {
1419
+ const a = { foo: {} };
1420
+ a['self'] = a;
1421
+ const b = { foo: {} };
1422
+ b['self'] = b;
1423
+ $mol_assert_ok($mol_compare_deep(a, b));
1514
1424
  },
1515
- 'two must be alike'() {
1516
- $mol_assert_like([3], [3]);
1425
+ 'Date'() {
1426
+ $mol_assert_ok($mol_compare_deep(new Date(12345), new Date(12345)));
1427
+ $mol_assert_not($mol_compare_deep(new Date(12345), new Date(12346)));
1517
1428
  },
1518
- 'three must be alike'() {
1519
- $mol_assert_like([3], [3], [3]);
1429
+ 'RegExp'() {
1430
+ $mol_assert_ok($mol_compare_deep(/\x22/mig, /\x22/mig));
1431
+ $mol_assert_not($mol_compare_deep(/\x22/mig, /\x21/mig));
1432
+ $mol_assert_not($mol_compare_deep(/\x22/mig, /\x22/mg));
1433
+ },
1434
+ 'Error'() {
1435
+ $mol_assert_not($mol_compare_deep(new Error('xxx'), new Error('xxx')));
1436
+ const fail = (message) => new Error(message);
1437
+ $mol_assert_ok($mol_compare_deep(...['xxx', 'xxx'].map(msg => new Error(msg))));
1438
+ $mol_assert_not($mol_compare_deep(...['xxx', 'yyy'].map(msg => new Error(msg))));
1439
+ },
1440
+ 'Map'() {
1441
+ $mol_assert_ok($mol_compare_deep(new Map, new Map));
1442
+ $mol_assert_ok($mol_compare_deep(new Map([[1, [2]]]), new Map([[1, [2]]])));
1443
+ $mol_assert_ok($mol_compare_deep(new Map([[[1], 2]]), new Map([[[1], 2]])));
1444
+ $mol_assert_not($mol_compare_deep(new Map([[1, 2]]), new Map([[1, 3]])));
1445
+ $mol_assert_not($mol_compare_deep(new Map([[[1], 2]]), new Map([[[3], 2]])));
1446
+ },
1447
+ 'Set'() {
1448
+ $mol_assert_ok($mol_compare_deep(new Set, new Set));
1449
+ $mol_assert_ok($mol_compare_deep(new Set([1, [2]]), new Set([1, [2]])));
1450
+ $mol_assert_not($mol_compare_deep(new Set([1]), new Set([2])));
1451
+ },
1452
+ 'Uint8Array'() {
1453
+ $mol_assert_ok($mol_compare_deep(new Uint8Array, new Uint8Array));
1454
+ $mol_assert_ok($mol_compare_deep(new Uint8Array([0]), new Uint8Array([0])));
1455
+ $mol_assert_not($mol_compare_deep(new Uint8Array([0]), new Uint8Array([1])));
1456
+ },
1457
+ 'Custom comparator'() {
1458
+ class User {
1459
+ name;
1460
+ rand;
1461
+ constructor(name, rand = Math.random()) {
1462
+ this.name = name;
1463
+ this.rand = rand;
1464
+ }
1465
+ [Symbol.toPrimitive](mode) {
1466
+ return this.name;
1467
+ }
1468
+ }
1469
+ $mol_assert_ok($mol_compare_deep(new User('Jin'), new User('Jin')));
1470
+ $mol_assert_not($mol_compare_deep(new User('Jin'), new User('John')));
1520
1471
  },
1521
1472
  });
1522
1473
  })($ || ($ = {}));
1523
- //mol/assert/assert.test.ts
1474
+ //mol/compare/deep/deep.test.tsx
1475
+ ;
1476
+ "use strict";
1477
+ var $;
1478
+ (function ($) {
1479
+ function $mol_dom_serialize(node) {
1480
+ const serializer = new $mol_dom_context.XMLSerializer;
1481
+ return serializer.serializeToString(node);
1482
+ }
1483
+ $.$mol_dom_serialize = $mol_dom_serialize;
1484
+ })($ || ($ = {}));
1485
+ //mol/dom/serialize/serialize.ts
1524
1486
  ;
1525
1487
  "use strict";
1526
1488
  var $;
@@ -1620,136 +1582,44 @@ var $;
1620
1582
  var $;
1621
1583
  (function ($) {
1622
1584
  $mol_test({
1623
- 'parse and serial'() {
1624
- $mol_assert_equal(new $mol_time_duration('P42.1Y').toString(), 'P42.1YT');
1625
- $mol_assert_equal(new $mol_time_duration('P42.1M').toString(), 'P42.1MT');
1626
- $mol_assert_equal(new $mol_time_duration('P42.1D').toString(), 'P42.1DT');
1627
- $mol_assert_equal(new $mol_time_duration('PT42.1h').toString(), 'PT42.1H');
1628
- $mol_assert_equal(new $mol_time_duration('PT42.1m').toString(), 'PT42.1M');
1629
- $mol_assert_equal(new $mol_time_duration('PT42.1s').toString(), 'PT42.1S');
1630
- $mol_assert_equal(new $mol_time_duration('P1Y2M3DT4h5m6.7s').toString(), 'P1Y2M3DT4H5M6.7S');
1631
- },
1632
- 'format typed'() {
1633
- $mol_assert_equal(new $mol_time_duration('P1Y2M3DT4h5m6s').toString('P#Y#M#DT#h#m#s'), 'P1Y2M3DT4H5M6S');
1634
- },
1635
- 'comparison'() {
1636
- const iso = 'P1Y1M1DT1h1m1s';
1637
- $mol_assert_like(new $mol_time_duration(iso), new $mol_time_duration(iso));
1638
- },
1639
- });
1640
- })($ || ($ = {}));
1641
- //mol/time/duration/duration.test.ts
1642
- ;
1643
- "use strict";
1644
- var $;
1645
- (function ($) {
1646
- $.$mol_ambient_ref = Symbol('$mol_ambient_ref');
1647
- function $mol_ambient(overrides) {
1648
- return Object.setPrototypeOf(overrides, this || $);
1649
- }
1650
- $.$mol_ambient = $mol_ambient;
1651
- })($ || ($ = {}));
1652
- //mol/ambient/ambient.ts
1653
- ;
1654
- "use strict";
1655
- var $;
1656
- (function ($) {
1657
- $mol_test({
1658
- 'get'() {
1659
- const proxy = $mol_delegate({}, () => ({ foo: 777 }));
1660
- $mol_assert_equal(proxy.foo, 777);
1661
- },
1662
- 'has'() {
1663
- const proxy = $mol_delegate({}, () => ({ foo: 777 }));
1664
- $mol_assert_equal('foo' in proxy, true);
1665
- },
1666
- 'set'() {
1667
- const target = { foo: 777 };
1668
- const proxy = $mol_delegate({}, () => target);
1669
- proxy.foo = 123;
1670
- $mol_assert_equal(target.foo, 123);
1671
- },
1672
- 'getOwnPropertyDescriptor'() {
1673
- const proxy = $mol_delegate({}, () => ({ foo: 777 }));
1674
- $mol_assert_like(Object.getOwnPropertyDescriptor(proxy, 'foo'), {
1675
- value: 777,
1676
- writable: true,
1677
- enumerable: true,
1678
- configurable: true,
1679
- });
1585
+ 'must be false'() {
1586
+ $mol_assert_not(0);
1680
1587
  },
1681
- 'ownKeys'() {
1682
- const proxy = $mol_delegate({}, () => ({ foo: 777, [Symbol.toStringTag]: 'bar' }));
1683
- $mol_assert_like(Reflect.ownKeys(proxy), ['foo', Symbol.toStringTag]);
1588
+ 'must be true'() {
1589
+ $mol_assert_ok(1);
1684
1590
  },
1685
- 'getPrototypeOf'() {
1686
- class Foo {
1687
- }
1688
- const proxy = $mol_delegate({}, () => new Foo);
1689
- $mol_assert_equal(Object.getPrototypeOf(proxy), Foo.prototype);
1591
+ 'two must be equal'() {
1592
+ $mol_assert_equal(2, 2);
1690
1593
  },
1691
- 'setPrototypeOf'() {
1692
- class Foo {
1693
- }
1694
- const target = {};
1695
- const proxy = $mol_delegate({}, () => target);
1696
- Object.setPrototypeOf(proxy, Foo.prototype);
1697
- $mol_assert_equal(Object.getPrototypeOf(target), Foo.prototype);
1594
+ 'three must be equal'() {
1595
+ $mol_assert_equal(2, 2, 2);
1698
1596
  },
1699
- 'instanceof'() {
1700
- class Foo {
1701
- }
1702
- const proxy = $mol_delegate({}, () => new Foo);
1703
- $mol_assert_ok(proxy instanceof Foo);
1704
- $mol_assert_ok(proxy instanceof $mol_delegate);
1597
+ 'two must be unique'() {
1598
+ $mol_assert_unique([3], [3]);
1705
1599
  },
1706
- 'autobind'() {
1707
- class Foo {
1708
- }
1709
- const proxy = $mol_delegate({}, () => new Foo);
1710
- $mol_assert_ok(proxy instanceof Foo);
1711
- $mol_assert_ok(proxy instanceof $mol_delegate);
1600
+ 'three must be unique'() {
1601
+ $mol_assert_unique([3], [3], [3]);
1602
+ },
1603
+ 'two must be alike'() {
1604
+ $mol_assert_like([3], [3]);
1605
+ },
1606
+ 'three must be alike'() {
1607
+ $mol_assert_like([3], [3], [3]);
1712
1608
  },
1713
1609
  });
1714
1610
  })($ || ($ = {}));
1715
- //mol/delegate/delegate.test.ts
1716
- ;
1717
- "use strict";
1718
- var $;
1719
- (function ($) {
1720
- const instances = new WeakSet();
1721
- function $mol_delegate(proto, target) {
1722
- const proxy = new Proxy(proto, {
1723
- get: (_, field) => {
1724
- const obj = target();
1725
- let val = Reflect.get(obj, field);
1726
- if (typeof val === 'function') {
1727
- val = val.bind(obj);
1728
- }
1729
- return val;
1730
- },
1731
- has: (_, field) => Reflect.has(target(), field),
1732
- set: (_, field, value) => Reflect.set(target(), field, value),
1733
- getOwnPropertyDescriptor: (_, field) => Reflect.getOwnPropertyDescriptor(target(), field),
1734
- ownKeys: () => Reflect.ownKeys(target()),
1735
- getPrototypeOf: () => Reflect.getPrototypeOf(target()),
1736
- setPrototypeOf: (_, donor) => Reflect.setPrototypeOf(target(), donor),
1737
- isExtensible: () => Reflect.isExtensible(target()),
1738
- preventExtensions: () => Reflect.preventExtensions(target()),
1739
- apply: (_, self, args) => Reflect.apply(target(), self, args),
1740
- construct: (_, args, retarget) => Reflect.construct(target(), args, retarget),
1741
- defineProperty: (_, field, descr) => Reflect.defineProperty(target(), field, descr),
1742
- deleteProperty: (_, field) => Reflect.deleteProperty(target(), field),
1743
- });
1744
- instances.add(proxy);
1745
- return proxy;
1746
- }
1747
- $.$mol_delegate = $mol_delegate;
1748
- Reflect.defineProperty($mol_delegate, Symbol.hasInstance, {
1749
- value: (obj) => instances.has(obj),
1750
- });
1751
- })($ || ($ = {}));
1752
- //mol/delegate/delegate.ts
1611
+ //mol/assert/assert.test.ts
1612
+ ;
1613
+ "use strict";
1614
+ var $;
1615
+ (function ($) {
1616
+ $.$mol_ambient_ref = Symbol('$mol_ambient_ref');
1617
+ function $mol_ambient(overrides) {
1618
+ return Object.setPrototypeOf(overrides, this || $);
1619
+ }
1620
+ $.$mol_ambient = $mol_ambient;
1621
+ })($ || ($ = {}));
1622
+ //mol/ambient/ambient.ts
1753
1623
  ;
1754
1624
  "use strict";
1755
1625
  var $;
@@ -1808,12 +1678,18 @@ var $;
1808
1678
  //mol/owning/owning.ts
1809
1679
  ;
1810
1680
  "use strict";
1811
- //mol/type/writable/writable.test.ts
1681
+ //mol/type/equals/equals.ts
1682
+ ;
1683
+ "use strict";
1684
+ //mol/type/equals/equals.test.ts
1812
1685
  ;
1813
1686
  "use strict";
1814
1687
  //mol/type/writable/writable.ts
1815
1688
  ;
1816
1689
  "use strict";
1690
+ //mol/type/writable/writable.test.ts
1691
+ ;
1692
+ "use strict";
1817
1693
  var $;
1818
1694
  (function ($) {
1819
1695
  class $mol_object2 {
@@ -1858,63 +1734,103 @@ var $;
1858
1734
  ;
1859
1735
  "use strict";
1860
1736
  var $;
1861
- (function ($_1) {
1737
+ (function ($) {
1738
+ const instances = new WeakSet();
1739
+ function $mol_delegate(proto, target) {
1740
+ const proxy = new Proxy(proto, {
1741
+ get: (_, field) => {
1742
+ const obj = target();
1743
+ let val = Reflect.get(obj, field);
1744
+ if (typeof val === 'function') {
1745
+ val = val.bind(obj);
1746
+ }
1747
+ return val;
1748
+ },
1749
+ has: (_, field) => Reflect.has(target(), field),
1750
+ set: (_, field, value) => Reflect.set(target(), field, value),
1751
+ getOwnPropertyDescriptor: (_, field) => Reflect.getOwnPropertyDescriptor(target(), field),
1752
+ ownKeys: () => Reflect.ownKeys(target()),
1753
+ getPrototypeOf: () => Reflect.getPrototypeOf(target()),
1754
+ setPrototypeOf: (_, donor) => Reflect.setPrototypeOf(target(), donor),
1755
+ isExtensible: () => Reflect.isExtensible(target()),
1756
+ preventExtensions: () => Reflect.preventExtensions(target()),
1757
+ apply: (_, self, args) => Reflect.apply(target(), self, args),
1758
+ construct: (_, args, retarget) => Reflect.construct(target(), args, retarget),
1759
+ defineProperty: (_, field, descr) => Reflect.defineProperty(target(), field, descr),
1760
+ deleteProperty: (_, field) => Reflect.deleteProperty(target(), field),
1761
+ });
1762
+ instances.add(proxy);
1763
+ return proxy;
1764
+ }
1765
+ $.$mol_delegate = $mol_delegate;
1766
+ Reflect.defineProperty($mol_delegate, Symbol.hasInstance, {
1767
+ value: (obj) => instances.has(obj),
1768
+ });
1769
+ })($ || ($ = {}));
1770
+ //mol/delegate/delegate.ts
1771
+ ;
1772
+ "use strict";
1773
+ var $;
1774
+ (function ($) {
1862
1775
  $mol_test({
1863
- 'tree parsing'() {
1864
- $mol_assert_equal($mol_tree.fromString("foo\nbar\n").sub.length, 2);
1865
- $mol_assert_equal($mol_tree.fromString("foo\nbar\n").sub[1].type, "bar");
1866
- $mol_assert_equal($mol_tree.fromString("foo\n\n\n").sub.length, 1);
1867
- $mol_assert_equal($mol_tree.fromString("=foo\n\\bar\n").sub.length, 2);
1868
- $mol_assert_equal($mol_tree.fromString("=foo\n\\bar\n").sub[1].data, "bar");
1869
- $mol_assert_equal($mol_tree.fromString("foo bar \\pol").sub[0].sub[0].sub[0].data, "pol");
1870
- $mol_assert_equal($mol_tree.fromString("foo bar\n\t\\pol\n\t\\men").sub[0].sub[0].sub[1].data, "men");
1871
- $mol_assert_equal($mol_tree.fromString('foo bar \\text\n').toString(), 'foo bar \\text\n');
1872
- },
1873
- 'inserting'() {
1874
- $mol_assert_equal($mol_tree.fromString('a b c d').insert(new $mol_tree, 'a', 'b', 'c').toString(), 'a b \\\n');
1875
- $mol_assert_equal($mol_tree.fromString('a b').insert(new $mol_tree, 'a', 'b', 'c', 'd').toString(), 'a b c \\\n');
1876
- $mol_assert_equal($mol_tree.fromString('a b c d').insert(new $mol_tree, 0, 0, 0).toString(), 'a b \\\n');
1877
- $mol_assert_equal($mol_tree.fromString('a b').insert(new $mol_tree, 0, 0, 0, 0).toString(), 'a b \\\n\t\\\n');
1878
- $mol_assert_equal($mol_tree.fromString('a b c d').insert(new $mol_tree, null, null, null).toString(), 'a b \\\n');
1879
- $mol_assert_equal($mol_tree.fromString('a b').insert(new $mol_tree, null, null, null, null).toString(), 'a b \\\n\t\\\n');
1776
+ 'get'() {
1777
+ const proxy = $mol_delegate({}, () => ({ foo: 777 }));
1778
+ $mol_assert_equal(proxy.foo, 777);
1880
1779
  },
1881
- 'fromJSON'() {
1882
- $mol_assert_equal($mol_tree.fromJSON([]).toString(), '/\n');
1883
- $mol_assert_equal($mol_tree.fromJSON([false, true]).toString(), '/\n\tfalse\n\ttrue\n');
1884
- $mol_assert_equal($mol_tree.fromJSON([0, 1, 2.3]).toString(), '/\n\t0\n\t1\n\t2.3\n');
1885
- $mol_assert_equal($mol_tree.fromJSON(['', 'foo', 'bar\nbaz']).toString(), '/\n\t\\\n\t\\foo\n\t\\\n\t\t\\bar\n\t\t\\baz\n');
1886
- $mol_assert_equal($mol_tree.fromJSON({ 'foo': false, 'bar\nbaz': 'lol' }).toString(), '*\n\tfoo false\n\t\\\n\t\t\\bar\n\t\t\\baz\n\t\t\\lol\n');
1780
+ 'has'() {
1781
+ const proxy = $mol_delegate({}, () => ({ foo: 777 }));
1782
+ $mol_assert_equal('foo' in proxy, true);
1887
1783
  },
1888
- 'toJSON'() {
1889
- $mol_assert_equal(JSON.stringify($mol_tree.fromString('/\n').sub[0]), '[]');
1890
- $mol_assert_equal(JSON.stringify($mol_tree.fromString('/\n\tfalse\n\ttrue\n').sub[0]), '[false,true]');
1891
- $mol_assert_equal(JSON.stringify($mol_tree.fromString('/\n\t0\n\t1\n\t2.3\n').sub[0]), '[0,1,2.3]');
1892
- $mol_assert_equal(JSON.stringify($mol_tree.fromString('/\n\t\\\n\t\\foo\n\t\\\n\t\t\\bar\n\t\t\\baz\n').sub[0]), '["","foo","bar\\nbaz"]');
1893
- $mol_assert_equal(JSON.stringify($mol_tree.fromString('*\n\tfoo false\n\t\\\n\t\t\\bar\n\t\t\\baz\n\t\t\\lol\n').sub[0]), '{"foo":false,"bar\\nbaz":"lol"}');
1784
+ 'set'() {
1785
+ const target = { foo: 777 };
1786
+ const proxy = $mol_delegate({}, () => target);
1787
+ proxy.foo = 123;
1788
+ $mol_assert_equal(target.foo, 123);
1894
1789
  },
1895
- 'hack'() {
1896
- const res = $mol_tree.fromString(`foo bar xxx`).hack({
1897
- '': (tree, context) => [tree.hack(context)],
1898
- 'bar': (tree, context) => [tree.hack(context).clone({ type: '777' })],
1790
+ 'getOwnPropertyDescriptor'() {
1791
+ const proxy = $mol_delegate({}, () => ({ foo: 777 }));
1792
+ $mol_assert_like(Object.getOwnPropertyDescriptor(proxy, 'foo'), {
1793
+ value: 777,
1794
+ writable: true,
1795
+ enumerable: true,
1796
+ configurable: true,
1899
1797
  });
1900
- $mol_assert_equal(res.toString(), new $mol_tree({ type: 'foo 777 xxx' }).toString());
1901
1798
  },
1902
- 'errors handling'($) {
1903
- const errors = [];
1904
- class Tree extends $mol_tree {
1905
- static $ = $.$mol_ambient({
1906
- $mol_fail: error => errors.push(error.message)
1907
- });
1799
+ 'ownKeys'() {
1800
+ const proxy = $mol_delegate({}, () => ({ foo: 777, [Symbol.toStringTag]: 'bar' }));
1801
+ $mol_assert_like(Reflect.ownKeys(proxy), ['foo', Symbol.toStringTag]);
1802
+ },
1803
+ 'getPrototypeOf'() {
1804
+ class Foo {
1908
1805
  }
1909
- Tree.fromString(`
1910
- \t \tfoo
1911
- bar \\data
1912
- `, 'test');
1913
- $mol_assert_like(errors, ['Syntax error at test:2\n \tfoo']);
1806
+ const proxy = $mol_delegate({}, () => new Foo);
1807
+ $mol_assert_equal(Object.getPrototypeOf(proxy), Foo.prototype);
1808
+ },
1809
+ 'setPrototypeOf'() {
1810
+ class Foo {
1811
+ }
1812
+ const target = {};
1813
+ const proxy = $mol_delegate({}, () => target);
1814
+ Object.setPrototypeOf(proxy, Foo.prototype);
1815
+ $mol_assert_equal(Object.getPrototypeOf(target), Foo.prototype);
1816
+ },
1817
+ 'instanceof'() {
1818
+ class Foo {
1819
+ }
1820
+ const proxy = $mol_delegate({}, () => new Foo);
1821
+ $mol_assert_ok(proxy instanceof Foo);
1822
+ $mol_assert_ok(proxy instanceof $mol_delegate);
1823
+ },
1824
+ 'autobind'() {
1825
+ class Foo {
1826
+ }
1827
+ const proxy = $mol_delegate({}, () => new Foo);
1828
+ $mol_assert_ok(proxy instanceof Foo);
1829
+ $mol_assert_ok(proxy instanceof $mol_delegate);
1914
1830
  },
1915
1831
  });
1916
1832
  })($ || ($ = {}));
1917
- //mol/tree/tree.test.ts
1833
+ //mol/delegate/delegate.test.ts
1918
1834
  ;
1919
1835
  "use strict";
1920
1836
  var $;
@@ -2250,15 +2166,61 @@ var $;
2250
2166
  var $;
2251
2167
  (function ($_1) {
2252
2168
  $mol_test({
2253
- 'FQN of anon function'($) {
2254
- const $$ = Object.assign($, { $mol_func_name_test: (() => () => { })() });
2255
- $mol_assert_equal($$.$mol_func_name_test.name, '');
2256
- $mol_assert_equal($$.$mol_func_name($$.$mol_func_name_test), '$mol_func_name_test');
2257
- $mol_assert_equal($$.$mol_func_name_test.name, '$mol_func_name_test');
2169
+ 'tree parsing'() {
2170
+ $mol_assert_equal($mol_tree.fromString("foo\nbar\n").sub.length, 2);
2171
+ $mol_assert_equal($mol_tree.fromString("foo\nbar\n").sub[1].type, "bar");
2172
+ $mol_assert_equal($mol_tree.fromString("foo\n\n\n").sub.length, 1);
2173
+ $mol_assert_equal($mol_tree.fromString("=foo\n\\bar\n").sub.length, 2);
2174
+ $mol_assert_equal($mol_tree.fromString("=foo\n\\bar\n").sub[1].data, "bar");
2175
+ $mol_assert_equal($mol_tree.fromString("foo bar \\pol").sub[0].sub[0].sub[0].data, "pol");
2176
+ $mol_assert_equal($mol_tree.fromString("foo bar\n\t\\pol\n\t\\men").sub[0].sub[0].sub[1].data, "men");
2177
+ $mol_assert_equal($mol_tree.fromString('foo bar \\text\n').toString(), 'foo bar \\text\n');
2178
+ },
2179
+ 'inserting'() {
2180
+ $mol_assert_equal($mol_tree.fromString('a b c d').insert(new $mol_tree, 'a', 'b', 'c').toString(), 'a b \\\n');
2181
+ $mol_assert_equal($mol_tree.fromString('a b').insert(new $mol_tree, 'a', 'b', 'c', 'd').toString(), 'a b c \\\n');
2182
+ $mol_assert_equal($mol_tree.fromString('a b c d').insert(new $mol_tree, 0, 0, 0).toString(), 'a b \\\n');
2183
+ $mol_assert_equal($mol_tree.fromString('a b').insert(new $mol_tree, 0, 0, 0, 0).toString(), 'a b \\\n\t\\\n');
2184
+ $mol_assert_equal($mol_tree.fromString('a b c d').insert(new $mol_tree, null, null, null).toString(), 'a b \\\n');
2185
+ $mol_assert_equal($mol_tree.fromString('a b').insert(new $mol_tree, null, null, null, null).toString(), 'a b \\\n\t\\\n');
2186
+ },
2187
+ 'fromJSON'() {
2188
+ $mol_assert_equal($mol_tree.fromJSON([]).toString(), '/\n');
2189
+ $mol_assert_equal($mol_tree.fromJSON([false, true]).toString(), '/\n\tfalse\n\ttrue\n');
2190
+ $mol_assert_equal($mol_tree.fromJSON([0, 1, 2.3]).toString(), '/\n\t0\n\t1\n\t2.3\n');
2191
+ $mol_assert_equal($mol_tree.fromJSON(['', 'foo', 'bar\nbaz']).toString(), '/\n\t\\\n\t\\foo\n\t\\\n\t\t\\bar\n\t\t\\baz\n');
2192
+ $mol_assert_equal($mol_tree.fromJSON({ 'foo': false, 'bar\nbaz': 'lol' }).toString(), '*\n\tfoo false\n\t\\\n\t\t\\bar\n\t\t\\baz\n\t\t\\lol\n');
2193
+ },
2194
+ 'toJSON'() {
2195
+ $mol_assert_equal(JSON.stringify($mol_tree.fromString('/\n').sub[0]), '[]');
2196
+ $mol_assert_equal(JSON.stringify($mol_tree.fromString('/\n\tfalse\n\ttrue\n').sub[0]), '[false,true]');
2197
+ $mol_assert_equal(JSON.stringify($mol_tree.fromString('/\n\t0\n\t1\n\t2.3\n').sub[0]), '[0,1,2.3]');
2198
+ $mol_assert_equal(JSON.stringify($mol_tree.fromString('/\n\t\\\n\t\\foo\n\t\\\n\t\t\\bar\n\t\t\\baz\n').sub[0]), '["","foo","bar\\nbaz"]');
2199
+ $mol_assert_equal(JSON.stringify($mol_tree.fromString('*\n\tfoo false\n\t\\\n\t\t\\bar\n\t\t\\baz\n\t\t\\lol\n').sub[0]), '{"foo":false,"bar\\nbaz":"lol"}');
2200
+ },
2201
+ 'hack'() {
2202
+ const res = $mol_tree.fromString(`foo bar xxx`).hack({
2203
+ '': (tree, context) => [tree.hack(context)],
2204
+ 'bar': (tree, context) => [tree.hack(context).clone({ type: '777' })],
2205
+ });
2206
+ $mol_assert_equal(res.toString(), new $mol_tree({ type: 'foo 777 xxx' }).toString());
2207
+ },
2208
+ 'errors handling'($) {
2209
+ const errors = [];
2210
+ class Tree extends $mol_tree {
2211
+ static $ = $.$mol_ambient({
2212
+ $mol_fail: error => errors.push(error.message)
2213
+ });
2214
+ }
2215
+ Tree.fromString(`
2216
+ \t \tfoo
2217
+ bar \\data
2218
+ `, 'test');
2219
+ $mol_assert_like(errors, ['Syntax error at test:2\n \tfoo']);
2258
2220
  },
2259
2221
  });
2260
2222
  })($ || ($ = {}));
2261
- //mol/func/name/name.test.ts
2223
+ //mol/tree/tree.test.ts
2262
2224
  ;
2263
2225
  "use strict";
2264
2226
  var $;
@@ -2294,6 +2256,44 @@ var $;
2294
2256
  ;
2295
2257
  "use strict";
2296
2258
  var $;
2259
+ (function ($_1) {
2260
+ $mol_test({
2261
+ 'FQN of anon function'($) {
2262
+ const $$ = Object.assign($, { $mol_func_name_test: (() => () => { })() });
2263
+ $mol_assert_equal($$.$mol_func_name_test.name, '');
2264
+ $mol_assert_equal($$.$mol_func_name($$.$mol_func_name_test), '$mol_func_name_test');
2265
+ $mol_assert_equal($$.$mol_func_name_test.name, '$mol_func_name_test');
2266
+ },
2267
+ });
2268
+ })($ || ($ = {}));
2269
+ //mol/func/name/name.test.ts
2270
+ ;
2271
+ "use strict";
2272
+ var $;
2273
+ (function ($) {
2274
+ $mol_test({
2275
+ 'parse and serial'() {
2276
+ $mol_assert_equal(new $mol_time_duration('P42.1Y').toString(), 'P42.1YT');
2277
+ $mol_assert_equal(new $mol_time_duration('P42.1M').toString(), 'P42.1MT');
2278
+ $mol_assert_equal(new $mol_time_duration('P42.1D').toString(), 'P42.1DT');
2279
+ $mol_assert_equal(new $mol_time_duration('PT42.1h').toString(), 'PT42.1H');
2280
+ $mol_assert_equal(new $mol_time_duration('PT42.1m').toString(), 'PT42.1M');
2281
+ $mol_assert_equal(new $mol_time_duration('PT42.1s').toString(), 'PT42.1S');
2282
+ $mol_assert_equal(new $mol_time_duration('P1Y2M3DT4h5m6.7s').toString(), 'P1Y2M3DT4H5M6.7S');
2283
+ },
2284
+ 'format typed'() {
2285
+ $mol_assert_equal(new $mol_time_duration('P1Y2M3DT4h5m6s').toString('P#Y#M#DT#h#m#s'), 'P1Y2M3DT4H5M6S');
2286
+ },
2287
+ 'comparison'() {
2288
+ const iso = 'P1Y1M1DT1h1m1s';
2289
+ $mol_assert_like(new $mol_time_duration(iso), new $mol_time_duration(iso));
2290
+ },
2291
+ });
2292
+ })($ || ($ = {}));
2293
+ //mol/time/duration/duration.test.ts
2294
+ ;
2295
+ "use strict";
2296
+ var $;
2297
2297
  (function ($) {
2298
2298
  $mol_test({
2299
2299
  'parse and serial'() {