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.deps.json +1 -1
- package/node.js +13 -13
- package/node.js.map +1 -1
- package/node.mjs +13 -13
- package/node.mjs.map +1 -1
- package/node.test.js +397 -397
- package/node.test.js.map +1 -1
- package/package.json +1 -1
- package/web.deps.json +1 -1
- package/web.js +13 -13
- package/web.js.map +1 -1
- package/web.mjs +13 -13
- package/web.mjs.map +1 -1
- package/web.test.js +238 -238
- package/web.test.js.map +1 -1
package/web.test.js
CHANGED
|
@@ -178,112 +178,16 @@ var $;
|
|
|
178
178
|
//mol/type/error/error.ts
|
|
179
179
|
;
|
|
180
180
|
"use strict";
|
|
181
|
-
//mol/type/assert/assert.test.ts
|
|
182
|
-
;
|
|
183
|
-
"use strict";
|
|
184
181
|
//mol/type/assert/assert.ts
|
|
185
182
|
;
|
|
186
183
|
"use strict";
|
|
187
|
-
//mol/type/
|
|
188
|
-
;
|
|
189
|
-
"use strict";
|
|
190
|
-
//mol/type/equals/equals.ts
|
|
191
|
-
;
|
|
192
|
-
"use strict";
|
|
193
|
-
//mol/type/partial/deep/deep.test.ts
|
|
184
|
+
//mol/type/assert/assert.test.ts
|
|
194
185
|
;
|
|
195
186
|
"use strict";
|
|
196
187
|
//mol/type/partial/deep/deep.ts
|
|
197
188
|
;
|
|
198
189
|
"use strict";
|
|
199
|
-
|
|
200
|
-
(function ($) {
|
|
201
|
-
$mol_test({
|
|
202
|
-
'Make empty div'() {
|
|
203
|
-
$mol_assert_equal(($mol_jsx("div", null)).outerHTML, '<div></div>');
|
|
204
|
-
},
|
|
205
|
-
'Define native field'() {
|
|
206
|
-
const dom = $mol_jsx("input", { value: '123' });
|
|
207
|
-
$mol_assert_equal(dom.outerHTML, '<input value="123">');
|
|
208
|
-
$mol_assert_equal(dom.value, '123');
|
|
209
|
-
},
|
|
210
|
-
'Define classes'() {
|
|
211
|
-
const dom = $mol_jsx("div", { class: 'foo bar' });
|
|
212
|
-
$mol_assert_equal(dom.outerHTML, '<div class="foo bar"></div>');
|
|
213
|
-
},
|
|
214
|
-
'Define styles'() {
|
|
215
|
-
const dom = $mol_jsx("div", { style: { color: 'red' } });
|
|
216
|
-
$mol_assert_equal(dom.outerHTML, '<div style="color: red;"></div>');
|
|
217
|
-
},
|
|
218
|
-
'Define dataset'() {
|
|
219
|
-
const dom = $mol_jsx("div", { dataset: { foo: 'bar' } });
|
|
220
|
-
$mol_assert_equal(dom.outerHTML, '<div data-foo="bar"></div>');
|
|
221
|
-
},
|
|
222
|
-
'Define attributes'() {
|
|
223
|
-
const dom = $mol_jsx("div", { lang: "ru", hidden: true });
|
|
224
|
-
$mol_assert_equal(dom.outerHTML, '<div lang="ru" hidden=""></div>');
|
|
225
|
-
},
|
|
226
|
-
'Define child nodes'() {
|
|
227
|
-
const dom = $mol_jsx("div", null,
|
|
228
|
-
"hello",
|
|
229
|
-
$mol_jsx("strong", null, "world"),
|
|
230
|
-
"!");
|
|
231
|
-
$mol_assert_equal(dom.outerHTML, '<div>hello<strong>world</strong>!</div>');
|
|
232
|
-
},
|
|
233
|
-
'Function as component'() {
|
|
234
|
-
const Button = (props, target) => {
|
|
235
|
-
return $mol_jsx("button", { title: props.hint }, target());
|
|
236
|
-
};
|
|
237
|
-
const dom = $mol_jsx(Button, { id: "foo", hint: "click me" }, () => 'hey!');
|
|
238
|
-
$mol_assert_equal(dom.outerHTML, '<button id="foo" title="click me" class="Button">hey!</button>');
|
|
239
|
-
},
|
|
240
|
-
'Nested guid generation'() {
|
|
241
|
-
const Foo = () => {
|
|
242
|
-
return $mol_jsx("div", null,
|
|
243
|
-
$mol_jsx(Bar, { id: "bar" },
|
|
244
|
-
$mol_jsx("img", { id: "icon" })));
|
|
245
|
-
};
|
|
246
|
-
const Bar = (props, icon) => {
|
|
247
|
-
return $mol_jsx("span", null,
|
|
248
|
-
icon,
|
|
249
|
-
$mol_jsx("i", { id: "label" }));
|
|
250
|
-
};
|
|
251
|
-
const dom = $mol_jsx(Foo, { id: "foo" });
|
|
252
|
-
$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>');
|
|
253
|
-
},
|
|
254
|
-
'Fail on non unique ids'() {
|
|
255
|
-
const App = () => {
|
|
256
|
-
return $mol_jsx("div", null,
|
|
257
|
-
$mol_jsx("span", { id: "bar" }),
|
|
258
|
-
$mol_jsx("span", { id: "bar" }));
|
|
259
|
-
};
|
|
260
|
-
$mol_assert_fail(() => $mol_jsx(App, { id: "foo" }), 'JSX already has tag with id "foo/bar"');
|
|
261
|
-
},
|
|
262
|
-
'Owner based guid generationn'() {
|
|
263
|
-
const Foo = () => {
|
|
264
|
-
return $mol_jsx("div", null,
|
|
265
|
-
$mol_jsx(Bar, { id: "middle", icon: () => $mol_jsx("img", { id: "icon" }) }));
|
|
266
|
-
};
|
|
267
|
-
const Bar = (props) => {
|
|
268
|
-
return $mol_jsx("span", null, props.icon());
|
|
269
|
-
};
|
|
270
|
-
const dom = $mol_jsx(Foo, { id: "app" });
|
|
271
|
-
$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>');
|
|
272
|
-
},
|
|
273
|
-
'Fail on same ids from different caller'() {
|
|
274
|
-
const Foo = () => {
|
|
275
|
-
return $mol_jsx("div", null,
|
|
276
|
-
$mol_jsx("img", { id: "icon" }),
|
|
277
|
-
$mol_jsx(Bar, { id: "bar", icon: () => $mol_jsx("img", { id: "icon" }) }));
|
|
278
|
-
};
|
|
279
|
-
const Bar = (props) => {
|
|
280
|
-
return $mol_jsx("span", null, props.icon());
|
|
281
|
-
};
|
|
282
|
-
$mol_assert_fail(() => $mol_jsx(Foo, { id: "foo" }), 'JSX already has tag with id "foo/icon"');
|
|
283
|
-
},
|
|
284
|
-
});
|
|
285
|
-
})($ || ($ = {}));
|
|
286
|
-
//mol/jsx/jsx.test.tsx
|
|
190
|
+
//mol/type/partial/deep/deep.test.ts
|
|
287
191
|
;
|
|
288
192
|
"use strict";
|
|
289
193
|
var $;
|
|
@@ -410,97 +314,91 @@ var $;
|
|
|
410
314
|
var $;
|
|
411
315
|
(function ($) {
|
|
412
316
|
$mol_test({
|
|
413
|
-
'
|
|
414
|
-
$
|
|
415
|
-
$mol_assert_ok($mol_compare_deep(undefined, undefined));
|
|
416
|
-
$mol_assert_not($mol_compare_deep(undefined, null));
|
|
417
|
-
$mol_assert_not($mol_compare_deep({}, null));
|
|
418
|
-
},
|
|
419
|
-
'number'() {
|
|
420
|
-
$mol_assert_ok($mol_compare_deep(1, 1));
|
|
421
|
-
$mol_assert_ok($mol_compare_deep(Number.NaN, Number.NaN));
|
|
422
|
-
$mol_assert_not($mol_compare_deep(1, 2));
|
|
423
|
-
$mol_assert_ok($mol_compare_deep(Object(1), Object(1)));
|
|
424
|
-
$mol_assert_not($mol_compare_deep(Object(1), Object(2)));
|
|
317
|
+
'Make empty div'() {
|
|
318
|
+
$mol_assert_equal(($mol_jsx("div", null)).outerHTML, '<div></div>');
|
|
425
319
|
},
|
|
426
|
-
'
|
|
427
|
-
$
|
|
428
|
-
$
|
|
429
|
-
$
|
|
430
|
-
$mol_assert_not($mol_compare_deep({}, { a: undefined }));
|
|
431
|
-
$mol_assert_ok($mol_compare_deep({ a: 1, b: 2 }, { b: 2, a: 1 }));
|
|
432
|
-
$mol_assert_ok($mol_compare_deep({ a: { b: 1 } }, { a: { b: 1 } }));
|
|
320
|
+
'Define native field'() {
|
|
321
|
+
const dom = $mol_jsx("input", { value: '123' });
|
|
322
|
+
$mol_assert_equal(dom.outerHTML, '<input value="123">');
|
|
323
|
+
$mol_assert_equal(dom.value, '123');
|
|
433
324
|
},
|
|
434
|
-
'
|
|
435
|
-
$
|
|
436
|
-
$
|
|
437
|
-
$mol_assert_not($mol_compare_deep([1, 2], [1, 3]));
|
|
438
|
-
$mol_assert_not($mol_compare_deep([1, 2,], [1, 3, undefined]));
|
|
325
|
+
'Define classes'() {
|
|
326
|
+
const dom = $mol_jsx("div", { class: 'foo bar' });
|
|
327
|
+
$mol_assert_equal(dom.outerHTML, '<div class="foo bar"></div>');
|
|
439
328
|
},
|
|
440
|
-
'
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
$mol_assert_not($mol_compare_deep(new Thing, new Thing));
|
|
444
|
-
$mol_assert_not($mol_compare_deep(() => 1, () => 1));
|
|
445
|
-
$mol_assert_not($mol_compare_deep(new RangeError('Test error'), new RangeError('Test error')));
|
|
329
|
+
'Define styles'() {
|
|
330
|
+
const dom = $mol_jsx("div", { style: { color: 'red' } });
|
|
331
|
+
$mol_assert_equal(dom.outerHTML, '<div style="color: red;"></div>');
|
|
446
332
|
},
|
|
447
|
-
'
|
|
448
|
-
const
|
|
449
|
-
|
|
450
|
-
const b = { foo: {} };
|
|
451
|
-
b['self'] = b;
|
|
452
|
-
$mol_assert_ok($mol_compare_deep(a, b));
|
|
333
|
+
'Define dataset'() {
|
|
334
|
+
const dom = $mol_jsx("div", { dataset: { foo: 'bar' } });
|
|
335
|
+
$mol_assert_equal(dom.outerHTML, '<div data-foo="bar"></div>');
|
|
453
336
|
},
|
|
454
|
-
'
|
|
455
|
-
$
|
|
456
|
-
$
|
|
337
|
+
'Define attributes'() {
|
|
338
|
+
const dom = $mol_jsx("div", { lang: "ru", hidden: true });
|
|
339
|
+
$mol_assert_equal(dom.outerHTML, '<div lang="ru" hidden=""></div>');
|
|
457
340
|
},
|
|
458
|
-
'
|
|
459
|
-
$
|
|
460
|
-
|
|
461
|
-
|
|
341
|
+
'Define child nodes'() {
|
|
342
|
+
const dom = $mol_jsx("div", null,
|
|
343
|
+
"hello",
|
|
344
|
+
$mol_jsx("strong", null, "world"),
|
|
345
|
+
"!");
|
|
346
|
+
$mol_assert_equal(dom.outerHTML, '<div>hello<strong>world</strong>!</div>');
|
|
462
347
|
},
|
|
463
|
-
'
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
$
|
|
348
|
+
'Function as component'() {
|
|
349
|
+
const Button = (props, target) => {
|
|
350
|
+
return $mol_jsx("button", { title: props.hint }, target());
|
|
351
|
+
};
|
|
352
|
+
const dom = $mol_jsx(Button, { id: "foo", hint: "click me" }, () => 'hey!');
|
|
353
|
+
$mol_assert_equal(dom.outerHTML, '<button id="foo" title="click me" class="Button">hey!</button>');
|
|
468
354
|
},
|
|
469
|
-
'
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
355
|
+
'Nested guid generation'() {
|
|
356
|
+
const Foo = () => {
|
|
357
|
+
return $mol_jsx("div", null,
|
|
358
|
+
$mol_jsx(Bar, { id: "bar" },
|
|
359
|
+
$mol_jsx("img", { id: "icon" })));
|
|
360
|
+
};
|
|
361
|
+
const Bar = (props, icon) => {
|
|
362
|
+
return $mol_jsx("span", null,
|
|
363
|
+
icon,
|
|
364
|
+
$mol_jsx("i", { id: "label" }));
|
|
365
|
+
};
|
|
366
|
+
const dom = $mol_jsx(Foo, { id: "foo" });
|
|
367
|
+
$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>');
|
|
475
368
|
},
|
|
476
|
-
'
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
369
|
+
'Fail on non unique ids'() {
|
|
370
|
+
const App = () => {
|
|
371
|
+
return $mol_jsx("div", null,
|
|
372
|
+
$mol_jsx("span", { id: "bar" }),
|
|
373
|
+
$mol_jsx("span", { id: "bar" }));
|
|
374
|
+
};
|
|
375
|
+
$mol_assert_fail(() => $mol_jsx(App, { id: "foo" }), 'JSX already has tag with id "foo/bar"');
|
|
480
376
|
},
|
|
481
|
-
'
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
377
|
+
'Owner based guid generationn'() {
|
|
378
|
+
const Foo = () => {
|
|
379
|
+
return $mol_jsx("div", null,
|
|
380
|
+
$mol_jsx(Bar, { id: "middle", icon: () => $mol_jsx("img", { id: "icon" }) }));
|
|
381
|
+
};
|
|
382
|
+
const Bar = (props) => {
|
|
383
|
+
return $mol_jsx("span", null, props.icon());
|
|
384
|
+
};
|
|
385
|
+
const dom = $mol_jsx(Foo, { id: "app" });
|
|
386
|
+
$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>');
|
|
485
387
|
},
|
|
486
|
-
'
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
}
|
|
497
|
-
}
|
|
498
|
-
$mol_assert_ok($mol_compare_deep(new User('Jin'), new User('Jin')));
|
|
499
|
-
$mol_assert_not($mol_compare_deep(new User('Jin'), new User('John')));
|
|
388
|
+
'Fail on same ids from different caller'() {
|
|
389
|
+
const Foo = () => {
|
|
390
|
+
return $mol_jsx("div", null,
|
|
391
|
+
$mol_jsx("img", { id: "icon" }),
|
|
392
|
+
$mol_jsx(Bar, { id: "bar", icon: () => $mol_jsx("img", { id: "icon" }) }));
|
|
393
|
+
};
|
|
394
|
+
const Bar = (props) => {
|
|
395
|
+
return $mol_jsx("span", null, props.icon());
|
|
396
|
+
};
|
|
397
|
+
$mol_assert_fail(() => $mol_jsx(Foo, { id: "foo" }), 'JSX already has tag with id "foo/icon"');
|
|
500
398
|
},
|
|
501
399
|
});
|
|
502
400
|
})($ || ($ = {}));
|
|
503
|
-
//mol/
|
|
401
|
+
//mol/jsx/jsx.test.tsx
|
|
504
402
|
;
|
|
505
403
|
"use strict";
|
|
506
404
|
var $;
|
|
@@ -629,46 +527,110 @@ var $;
|
|
|
629
527
|
;
|
|
630
528
|
"use strict";
|
|
631
529
|
var $;
|
|
632
|
-
(function ($) {
|
|
633
|
-
function $mol_dom_serialize(node) {
|
|
634
|
-
const serializer = new $mol_dom_context.XMLSerializer;
|
|
635
|
-
return serializer.serializeToString(node);
|
|
636
|
-
}
|
|
637
|
-
$.$mol_dom_serialize = $mol_dom_serialize;
|
|
638
|
-
})($ || ($ = {}));
|
|
639
|
-
//mol/dom/serialize/serialize.ts
|
|
640
|
-
;
|
|
641
|
-
"use strict";
|
|
642
|
-
var $;
|
|
643
530
|
(function ($) {
|
|
644
531
|
$mol_test({
|
|
645
|
-
'
|
|
646
|
-
$
|
|
532
|
+
'nulls & undefineds'() {
|
|
533
|
+
$mol_assert_ok($mol_compare_deep(null, null));
|
|
534
|
+
$mol_assert_ok($mol_compare_deep(undefined, undefined));
|
|
535
|
+
$mol_assert_not($mol_compare_deep(undefined, null));
|
|
536
|
+
$mol_assert_not($mol_compare_deep({}, null));
|
|
647
537
|
},
|
|
648
|
-
'
|
|
649
|
-
$mol_assert_ok(1);
|
|
538
|
+
'number'() {
|
|
539
|
+
$mol_assert_ok($mol_compare_deep(1, 1));
|
|
540
|
+
$mol_assert_ok($mol_compare_deep(Number.NaN, Number.NaN));
|
|
541
|
+
$mol_assert_not($mol_compare_deep(1, 2));
|
|
542
|
+
$mol_assert_ok($mol_compare_deep(Object(1), Object(1)));
|
|
543
|
+
$mol_assert_not($mol_compare_deep(Object(1), Object(2)));
|
|
650
544
|
},
|
|
651
|
-
'
|
|
652
|
-
$
|
|
545
|
+
'POJO'() {
|
|
546
|
+
$mol_assert_ok($mol_compare_deep({}, {}));
|
|
547
|
+
$mol_assert_not($mol_compare_deep({ a: 1 }, { b: 2 }));
|
|
548
|
+
$mol_assert_not($mol_compare_deep({ a: 1 }, { a: 2 }));
|
|
549
|
+
$mol_assert_not($mol_compare_deep({}, { a: undefined }));
|
|
550
|
+
$mol_assert_ok($mol_compare_deep({ a: 1, b: 2 }, { b: 2, a: 1 }));
|
|
551
|
+
$mol_assert_ok($mol_compare_deep({ a: { b: 1 } }, { a: { b: 1 } }));
|
|
653
552
|
},
|
|
654
|
-
'
|
|
655
|
-
$
|
|
553
|
+
'Array'() {
|
|
554
|
+
$mol_assert_ok($mol_compare_deep([], []));
|
|
555
|
+
$mol_assert_ok($mol_compare_deep([1, [2]], [1, [2]]));
|
|
556
|
+
$mol_assert_not($mol_compare_deep([1, 2], [1, 3]));
|
|
557
|
+
$mol_assert_not($mol_compare_deep([1, 2,], [1, 3, undefined]));
|
|
656
558
|
},
|
|
657
|
-
'
|
|
658
|
-
|
|
559
|
+
'Non POJO are different'() {
|
|
560
|
+
class Thing extends Object {
|
|
561
|
+
}
|
|
562
|
+
$mol_assert_not($mol_compare_deep(new Thing, new Thing));
|
|
563
|
+
$mol_assert_not($mol_compare_deep(() => 1, () => 1));
|
|
564
|
+
$mol_assert_not($mol_compare_deep(new RangeError('Test error'), new RangeError('Test error')));
|
|
659
565
|
},
|
|
660
|
-
'
|
|
661
|
-
|
|
566
|
+
'same POJOs with cyclic reference'() {
|
|
567
|
+
const a = { foo: {} };
|
|
568
|
+
a['self'] = a;
|
|
569
|
+
const b = { foo: {} };
|
|
570
|
+
b['self'] = b;
|
|
571
|
+
$mol_assert_ok($mol_compare_deep(a, b));
|
|
662
572
|
},
|
|
663
|
-
'
|
|
664
|
-
$
|
|
573
|
+
'Date'() {
|
|
574
|
+
$mol_assert_ok($mol_compare_deep(new Date(12345), new Date(12345)));
|
|
575
|
+
$mol_assert_not($mol_compare_deep(new Date(12345), new Date(12346)));
|
|
665
576
|
},
|
|
666
|
-
'
|
|
667
|
-
$
|
|
577
|
+
'RegExp'() {
|
|
578
|
+
$mol_assert_ok($mol_compare_deep(/\x22/mig, /\x22/mig));
|
|
579
|
+
$mol_assert_not($mol_compare_deep(/\x22/mig, /\x21/mig));
|
|
580
|
+
$mol_assert_not($mol_compare_deep(/\x22/mig, /\x22/mg));
|
|
581
|
+
},
|
|
582
|
+
'Error'() {
|
|
583
|
+
$mol_assert_not($mol_compare_deep(new Error('xxx'), new Error('xxx')));
|
|
584
|
+
const fail = (message) => new Error(message);
|
|
585
|
+
$mol_assert_ok($mol_compare_deep(...['xxx', 'xxx'].map(msg => new Error(msg))));
|
|
586
|
+
$mol_assert_not($mol_compare_deep(...['xxx', 'yyy'].map(msg => new Error(msg))));
|
|
587
|
+
},
|
|
588
|
+
'Map'() {
|
|
589
|
+
$mol_assert_ok($mol_compare_deep(new Map, new Map));
|
|
590
|
+
$mol_assert_ok($mol_compare_deep(new Map([[1, [2]]]), new Map([[1, [2]]])));
|
|
591
|
+
$mol_assert_ok($mol_compare_deep(new Map([[[1], 2]]), new Map([[[1], 2]])));
|
|
592
|
+
$mol_assert_not($mol_compare_deep(new Map([[1, 2]]), new Map([[1, 3]])));
|
|
593
|
+
$mol_assert_not($mol_compare_deep(new Map([[[1], 2]]), new Map([[[3], 2]])));
|
|
594
|
+
},
|
|
595
|
+
'Set'() {
|
|
596
|
+
$mol_assert_ok($mol_compare_deep(new Set, new Set));
|
|
597
|
+
$mol_assert_ok($mol_compare_deep(new Set([1, [2]]), new Set([1, [2]])));
|
|
598
|
+
$mol_assert_not($mol_compare_deep(new Set([1]), new Set([2])));
|
|
599
|
+
},
|
|
600
|
+
'Uint8Array'() {
|
|
601
|
+
$mol_assert_ok($mol_compare_deep(new Uint8Array, new Uint8Array));
|
|
602
|
+
$mol_assert_ok($mol_compare_deep(new Uint8Array([0]), new Uint8Array([0])));
|
|
603
|
+
$mol_assert_not($mol_compare_deep(new Uint8Array([0]), new Uint8Array([1])));
|
|
604
|
+
},
|
|
605
|
+
'Custom comparator'() {
|
|
606
|
+
class User {
|
|
607
|
+
name;
|
|
608
|
+
rand;
|
|
609
|
+
constructor(name, rand = Math.random()) {
|
|
610
|
+
this.name = name;
|
|
611
|
+
this.rand = rand;
|
|
612
|
+
}
|
|
613
|
+
[Symbol.toPrimitive](mode) {
|
|
614
|
+
return this.name;
|
|
615
|
+
}
|
|
616
|
+
}
|
|
617
|
+
$mol_assert_ok($mol_compare_deep(new User('Jin'), new User('Jin')));
|
|
618
|
+
$mol_assert_not($mol_compare_deep(new User('Jin'), new User('John')));
|
|
668
619
|
},
|
|
669
620
|
});
|
|
670
621
|
})($ || ($ = {}));
|
|
671
|
-
//mol/
|
|
622
|
+
//mol/compare/deep/deep.test.tsx
|
|
623
|
+
;
|
|
624
|
+
"use strict";
|
|
625
|
+
var $;
|
|
626
|
+
(function ($) {
|
|
627
|
+
function $mol_dom_serialize(node) {
|
|
628
|
+
const serializer = new $mol_dom_context.XMLSerializer;
|
|
629
|
+
return serializer.serializeToString(node);
|
|
630
|
+
}
|
|
631
|
+
$.$mol_dom_serialize = $mol_dom_serialize;
|
|
632
|
+
})($ || ($ = {}));
|
|
633
|
+
//mol/dom/serialize/serialize.ts
|
|
672
634
|
;
|
|
673
635
|
"use strict";
|
|
674
636
|
var $;
|
|
@@ -768,25 +730,33 @@ var $;
|
|
|
768
730
|
var $;
|
|
769
731
|
(function ($) {
|
|
770
732
|
$mol_test({
|
|
771
|
-
'
|
|
772
|
-
$
|
|
773
|
-
$mol_assert_equal(new $mol_time_duration('P42.1M').toString(), 'P42.1MT');
|
|
774
|
-
$mol_assert_equal(new $mol_time_duration('P42.1D').toString(), 'P42.1DT');
|
|
775
|
-
$mol_assert_equal(new $mol_time_duration('PT42.1h').toString(), 'PT42.1H');
|
|
776
|
-
$mol_assert_equal(new $mol_time_duration('PT42.1m').toString(), 'PT42.1M');
|
|
777
|
-
$mol_assert_equal(new $mol_time_duration('PT42.1s').toString(), 'PT42.1S');
|
|
778
|
-
$mol_assert_equal(new $mol_time_duration('P1Y2M3DT4h5m6.7s').toString(), 'P1Y2M3DT4H5M6.7S');
|
|
733
|
+
'must be false'() {
|
|
734
|
+
$mol_assert_not(0);
|
|
779
735
|
},
|
|
780
|
-
'
|
|
781
|
-
$
|
|
736
|
+
'must be true'() {
|
|
737
|
+
$mol_assert_ok(1);
|
|
782
738
|
},
|
|
783
|
-
'
|
|
784
|
-
|
|
785
|
-
|
|
739
|
+
'two must be equal'() {
|
|
740
|
+
$mol_assert_equal(2, 2);
|
|
741
|
+
},
|
|
742
|
+
'three must be equal'() {
|
|
743
|
+
$mol_assert_equal(2, 2, 2);
|
|
744
|
+
},
|
|
745
|
+
'two must be unique'() {
|
|
746
|
+
$mol_assert_unique([3], [3]);
|
|
747
|
+
},
|
|
748
|
+
'three must be unique'() {
|
|
749
|
+
$mol_assert_unique([3], [3], [3]);
|
|
750
|
+
},
|
|
751
|
+
'two must be alike'() {
|
|
752
|
+
$mol_assert_like([3], [3]);
|
|
753
|
+
},
|
|
754
|
+
'three must be alike'() {
|
|
755
|
+
$mol_assert_like([3], [3], [3]);
|
|
786
756
|
},
|
|
787
757
|
});
|
|
788
758
|
})($ || ($ = {}));
|
|
789
|
-
//mol/
|
|
759
|
+
//mol/assert/assert.test.ts
|
|
790
760
|
;
|
|
791
761
|
"use strict";
|
|
792
762
|
var $;
|
|
@@ -813,24 +783,16 @@ var $;
|
|
|
813
783
|
//mol/log3/log3.ts
|
|
814
784
|
;
|
|
815
785
|
"use strict";
|
|
816
|
-
//mol/type/
|
|
786
|
+
//mol/type/equals/equals.ts
|
|
787
|
+
;
|
|
788
|
+
"use strict";
|
|
789
|
+
//mol/type/equals/equals.test.ts
|
|
817
790
|
;
|
|
818
791
|
"use strict";
|
|
819
792
|
//mol/type/keys/extract/extract.ts
|
|
820
793
|
;
|
|
821
794
|
"use strict";
|
|
822
|
-
|
|
823
|
-
(function ($_1) {
|
|
824
|
-
$mol_test_mocks.push($ => {
|
|
825
|
-
$.$mol_log3_come = () => { };
|
|
826
|
-
$.$mol_log3_done = () => { };
|
|
827
|
-
$.$mol_log3_fail = () => { };
|
|
828
|
-
$.$mol_log3_warn = () => { };
|
|
829
|
-
$.$mol_log3_rise = () => { };
|
|
830
|
-
$.$mol_log3_area = () => () => { };
|
|
831
|
-
});
|
|
832
|
-
})($ || ($ = {}));
|
|
833
|
-
//mol/log3/log3.test.ts
|
|
795
|
+
//mol/type/keys/extract/extract.test.ts
|
|
834
796
|
;
|
|
835
797
|
"use strict";
|
|
836
798
|
var $;
|
|
@@ -864,16 +826,16 @@ var $;
|
|
|
864
826
|
"use strict";
|
|
865
827
|
var $;
|
|
866
828
|
(function ($_1) {
|
|
867
|
-
$
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
}
|
|
829
|
+
$mol_test_mocks.push($ => {
|
|
830
|
+
$.$mol_log3_come = () => { };
|
|
831
|
+
$.$mol_log3_done = () => { };
|
|
832
|
+
$.$mol_log3_fail = () => { };
|
|
833
|
+
$.$mol_log3_warn = () => { };
|
|
834
|
+
$.$mol_log3_rise = () => { };
|
|
835
|
+
$.$mol_log3_area = () => () => { };
|
|
874
836
|
});
|
|
875
837
|
})($ || ($ = {}));
|
|
876
|
-
//mol/
|
|
838
|
+
//mol/log3/log3.test.ts
|
|
877
839
|
;
|
|
878
840
|
"use strict";
|
|
879
841
|
var $;
|
|
@@ -909,6 +871,44 @@ var $;
|
|
|
909
871
|
;
|
|
910
872
|
"use strict";
|
|
911
873
|
var $;
|
|
874
|
+
(function ($_1) {
|
|
875
|
+
$mol_test({
|
|
876
|
+
'FQN of anon function'($) {
|
|
877
|
+
const $$ = Object.assign($, { $mol_func_name_test: (() => () => { })() });
|
|
878
|
+
$mol_assert_equal($$.$mol_func_name_test.name, '');
|
|
879
|
+
$mol_assert_equal($$.$mol_func_name($$.$mol_func_name_test), '$mol_func_name_test');
|
|
880
|
+
$mol_assert_equal($$.$mol_func_name_test.name, '$mol_func_name_test');
|
|
881
|
+
},
|
|
882
|
+
});
|
|
883
|
+
})($ || ($ = {}));
|
|
884
|
+
//mol/func/name/name.test.ts
|
|
885
|
+
;
|
|
886
|
+
"use strict";
|
|
887
|
+
var $;
|
|
888
|
+
(function ($) {
|
|
889
|
+
$mol_test({
|
|
890
|
+
'parse and serial'() {
|
|
891
|
+
$mol_assert_equal(new $mol_time_duration('P42.1Y').toString(), 'P42.1YT');
|
|
892
|
+
$mol_assert_equal(new $mol_time_duration('P42.1M').toString(), 'P42.1MT');
|
|
893
|
+
$mol_assert_equal(new $mol_time_duration('P42.1D').toString(), 'P42.1DT');
|
|
894
|
+
$mol_assert_equal(new $mol_time_duration('PT42.1h').toString(), 'PT42.1H');
|
|
895
|
+
$mol_assert_equal(new $mol_time_duration('PT42.1m').toString(), 'PT42.1M');
|
|
896
|
+
$mol_assert_equal(new $mol_time_duration('PT42.1s').toString(), 'PT42.1S');
|
|
897
|
+
$mol_assert_equal(new $mol_time_duration('P1Y2M3DT4h5m6.7s').toString(), 'P1Y2M3DT4H5M6.7S');
|
|
898
|
+
},
|
|
899
|
+
'format typed'() {
|
|
900
|
+
$mol_assert_equal(new $mol_time_duration('P1Y2M3DT4h5m6s').toString('P#Y#M#DT#h#m#s'), 'P1Y2M3DT4H5M6S');
|
|
901
|
+
},
|
|
902
|
+
'comparison'() {
|
|
903
|
+
const iso = 'P1Y1M1DT1h1m1s';
|
|
904
|
+
$mol_assert_like(new $mol_time_duration(iso), new $mol_time_duration(iso));
|
|
905
|
+
},
|
|
906
|
+
});
|
|
907
|
+
})($ || ($ = {}));
|
|
908
|
+
//mol/time/duration/duration.test.ts
|
|
909
|
+
;
|
|
910
|
+
"use strict";
|
|
911
|
+
var $;
|
|
912
912
|
(function ($) {
|
|
913
913
|
$mol_test({
|
|
914
914
|
'parse and serial'() {
|