mol_crypto_lib 0.0.633 → 0.0.635
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 +277 -277
- 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 +224 -224
- package/web.test.js.map +1 -1
package/web.test.js
CHANGED
|
@@ -188,112 +188,16 @@ var $;
|
|
|
188
188
|
//mol/type/error/error.ts
|
|
189
189
|
;
|
|
190
190
|
"use strict";
|
|
191
|
-
//mol/type/assert/assert.test.ts
|
|
192
|
-
;
|
|
193
|
-
"use strict";
|
|
194
191
|
//mol/type/assert/assert.ts
|
|
195
192
|
;
|
|
196
193
|
"use strict";
|
|
197
|
-
//mol/type/
|
|
198
|
-
;
|
|
199
|
-
"use strict";
|
|
200
|
-
//mol/type/equals/equals.ts
|
|
201
|
-
;
|
|
202
|
-
"use strict";
|
|
203
|
-
//mol/type/partial/deep/deep.test.ts
|
|
194
|
+
//mol/type/assert/assert.test.ts
|
|
204
195
|
;
|
|
205
196
|
"use strict";
|
|
206
197
|
//mol/type/partial/deep/deep.ts
|
|
207
198
|
;
|
|
208
199
|
"use strict";
|
|
209
|
-
|
|
210
|
-
(function ($) {
|
|
211
|
-
$mol_test({
|
|
212
|
-
'Make empty div'() {
|
|
213
|
-
$mol_assert_equal(($mol_jsx("div", null)).outerHTML, '<div></div>');
|
|
214
|
-
},
|
|
215
|
-
'Define native field'() {
|
|
216
|
-
const dom = $mol_jsx("input", { value: '123' });
|
|
217
|
-
$mol_assert_equal(dom.outerHTML, '<input value="123">');
|
|
218
|
-
$mol_assert_equal(dom.value, '123');
|
|
219
|
-
},
|
|
220
|
-
'Define classes'() {
|
|
221
|
-
const dom = $mol_jsx("div", { class: 'foo bar' });
|
|
222
|
-
$mol_assert_equal(dom.outerHTML, '<div class="foo bar"></div>');
|
|
223
|
-
},
|
|
224
|
-
'Define styles'() {
|
|
225
|
-
const dom = $mol_jsx("div", { style: { color: 'red' } });
|
|
226
|
-
$mol_assert_equal(dom.outerHTML, '<div style="color: red;"></div>');
|
|
227
|
-
},
|
|
228
|
-
'Define dataset'() {
|
|
229
|
-
const dom = $mol_jsx("div", { dataset: { foo: 'bar' } });
|
|
230
|
-
$mol_assert_equal(dom.outerHTML, '<div data-foo="bar"></div>');
|
|
231
|
-
},
|
|
232
|
-
'Define attributes'() {
|
|
233
|
-
const dom = $mol_jsx("div", { lang: "ru", hidden: true });
|
|
234
|
-
$mol_assert_equal(dom.outerHTML, '<div lang="ru" hidden=""></div>');
|
|
235
|
-
},
|
|
236
|
-
'Define child nodes'() {
|
|
237
|
-
const dom = $mol_jsx("div", null,
|
|
238
|
-
"hello",
|
|
239
|
-
$mol_jsx("strong", null, "world"),
|
|
240
|
-
"!");
|
|
241
|
-
$mol_assert_equal(dom.outerHTML, '<div>hello<strong>world</strong>!</div>');
|
|
242
|
-
},
|
|
243
|
-
'Function as component'() {
|
|
244
|
-
const Button = (props, target) => {
|
|
245
|
-
return $mol_jsx("button", { title: props.hint }, target());
|
|
246
|
-
};
|
|
247
|
-
const dom = $mol_jsx(Button, { id: "foo", hint: "click me" }, () => 'hey!');
|
|
248
|
-
$mol_assert_equal(dom.outerHTML, '<button id="foo" title="click me" class="Button">hey!</button>');
|
|
249
|
-
},
|
|
250
|
-
'Nested guid generation'() {
|
|
251
|
-
const Foo = () => {
|
|
252
|
-
return $mol_jsx("div", null,
|
|
253
|
-
$mol_jsx(Bar, { id: "bar" },
|
|
254
|
-
$mol_jsx("img", { id: "icon" })));
|
|
255
|
-
};
|
|
256
|
-
const Bar = (props, icon) => {
|
|
257
|
-
return $mol_jsx("span", null,
|
|
258
|
-
icon,
|
|
259
|
-
$mol_jsx("i", { id: "label" }));
|
|
260
|
-
};
|
|
261
|
-
const dom = $mol_jsx(Foo, { id: "foo" });
|
|
262
|
-
$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>');
|
|
263
|
-
},
|
|
264
|
-
'Fail on non unique ids'() {
|
|
265
|
-
const App = () => {
|
|
266
|
-
return $mol_jsx("div", null,
|
|
267
|
-
$mol_jsx("span", { id: "bar" }),
|
|
268
|
-
$mol_jsx("span", { id: "bar" }));
|
|
269
|
-
};
|
|
270
|
-
$mol_assert_fail(() => $mol_jsx(App, { id: "foo" }), 'JSX already has tag with id "foo/bar"');
|
|
271
|
-
},
|
|
272
|
-
'Owner based guid generationn'() {
|
|
273
|
-
const Foo = () => {
|
|
274
|
-
return $mol_jsx("div", null,
|
|
275
|
-
$mol_jsx(Bar, { id: "middle", icon: () => $mol_jsx("img", { id: "icon" }) }));
|
|
276
|
-
};
|
|
277
|
-
const Bar = (props) => {
|
|
278
|
-
return $mol_jsx("span", null, props.icon());
|
|
279
|
-
};
|
|
280
|
-
const dom = $mol_jsx(Foo, { id: "app" });
|
|
281
|
-
$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>');
|
|
282
|
-
},
|
|
283
|
-
'Fail on same ids from different caller'() {
|
|
284
|
-
const Foo = () => {
|
|
285
|
-
return $mol_jsx("div", null,
|
|
286
|
-
$mol_jsx("img", { id: "icon" }),
|
|
287
|
-
$mol_jsx(Bar, { id: "bar", icon: () => $mol_jsx("img", { id: "icon" }) }));
|
|
288
|
-
};
|
|
289
|
-
const Bar = (props) => {
|
|
290
|
-
return $mol_jsx("span", null, props.icon());
|
|
291
|
-
};
|
|
292
|
-
$mol_assert_fail(() => $mol_jsx(Foo, { id: "foo" }), 'JSX already has tag with id "foo/icon"');
|
|
293
|
-
},
|
|
294
|
-
});
|
|
295
|
-
})($ || ($ = {}));
|
|
296
|
-
//mol/jsx/jsx.test.tsx
|
|
200
|
+
//mol/type/partial/deep/deep.test.ts
|
|
297
201
|
;
|
|
298
202
|
"use strict";
|
|
299
203
|
var $;
|
|
@@ -420,97 +324,91 @@ var $;
|
|
|
420
324
|
var $;
|
|
421
325
|
(function ($) {
|
|
422
326
|
$mol_test({
|
|
423
|
-
'
|
|
424
|
-
$
|
|
425
|
-
$mol_assert_ok($mol_compare_deep(undefined, undefined));
|
|
426
|
-
$mol_assert_not($mol_compare_deep(undefined, null));
|
|
427
|
-
$mol_assert_not($mol_compare_deep({}, null));
|
|
428
|
-
},
|
|
429
|
-
'number'() {
|
|
430
|
-
$mol_assert_ok($mol_compare_deep(1, 1));
|
|
431
|
-
$mol_assert_ok($mol_compare_deep(Number.NaN, Number.NaN));
|
|
432
|
-
$mol_assert_not($mol_compare_deep(1, 2));
|
|
433
|
-
$mol_assert_ok($mol_compare_deep(Object(1), Object(1)));
|
|
434
|
-
$mol_assert_not($mol_compare_deep(Object(1), Object(2)));
|
|
327
|
+
'Make empty div'() {
|
|
328
|
+
$mol_assert_equal(($mol_jsx("div", null)).outerHTML, '<div></div>');
|
|
435
329
|
},
|
|
436
|
-
'
|
|
437
|
-
$
|
|
438
|
-
$
|
|
439
|
-
$
|
|
440
|
-
$mol_assert_not($mol_compare_deep({}, { a: undefined }));
|
|
441
|
-
$mol_assert_ok($mol_compare_deep({ a: 1, b: 2 }, { b: 2, a: 1 }));
|
|
442
|
-
$mol_assert_ok($mol_compare_deep({ a: { b: 1 } }, { a: { b: 1 } }));
|
|
330
|
+
'Define native field'() {
|
|
331
|
+
const dom = $mol_jsx("input", { value: '123' });
|
|
332
|
+
$mol_assert_equal(dom.outerHTML, '<input value="123">');
|
|
333
|
+
$mol_assert_equal(dom.value, '123');
|
|
443
334
|
},
|
|
444
|
-
'
|
|
445
|
-
$
|
|
446
|
-
$
|
|
447
|
-
$mol_assert_not($mol_compare_deep([1, 2], [1, 3]));
|
|
448
|
-
$mol_assert_not($mol_compare_deep([1, 2,], [1, 3, undefined]));
|
|
335
|
+
'Define classes'() {
|
|
336
|
+
const dom = $mol_jsx("div", { class: 'foo bar' });
|
|
337
|
+
$mol_assert_equal(dom.outerHTML, '<div class="foo bar"></div>');
|
|
449
338
|
},
|
|
450
|
-
'
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
$mol_assert_not($mol_compare_deep(new Thing, new Thing));
|
|
454
|
-
$mol_assert_not($mol_compare_deep(() => 1, () => 1));
|
|
455
|
-
$mol_assert_not($mol_compare_deep(new RangeError('Test error'), new RangeError('Test error')));
|
|
339
|
+
'Define styles'() {
|
|
340
|
+
const dom = $mol_jsx("div", { style: { color: 'red' } });
|
|
341
|
+
$mol_assert_equal(dom.outerHTML, '<div style="color: red;"></div>');
|
|
456
342
|
},
|
|
457
|
-
'
|
|
458
|
-
const
|
|
459
|
-
|
|
460
|
-
const b = { foo: {} };
|
|
461
|
-
b['self'] = b;
|
|
462
|
-
$mol_assert_ok($mol_compare_deep(a, b));
|
|
343
|
+
'Define dataset'() {
|
|
344
|
+
const dom = $mol_jsx("div", { dataset: { foo: 'bar' } });
|
|
345
|
+
$mol_assert_equal(dom.outerHTML, '<div data-foo="bar"></div>');
|
|
463
346
|
},
|
|
464
|
-
'
|
|
465
|
-
$
|
|
466
|
-
$
|
|
347
|
+
'Define attributes'() {
|
|
348
|
+
const dom = $mol_jsx("div", { lang: "ru", hidden: true });
|
|
349
|
+
$mol_assert_equal(dom.outerHTML, '<div lang="ru" hidden=""></div>');
|
|
467
350
|
},
|
|
468
|
-
'
|
|
469
|
-
$
|
|
470
|
-
|
|
471
|
-
|
|
351
|
+
'Define child nodes'() {
|
|
352
|
+
const dom = $mol_jsx("div", null,
|
|
353
|
+
"hello",
|
|
354
|
+
$mol_jsx("strong", null, "world"),
|
|
355
|
+
"!");
|
|
356
|
+
$mol_assert_equal(dom.outerHTML, '<div>hello<strong>world</strong>!</div>');
|
|
472
357
|
},
|
|
473
|
-
'
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
$
|
|
358
|
+
'Function as component'() {
|
|
359
|
+
const Button = (props, target) => {
|
|
360
|
+
return $mol_jsx("button", { title: props.hint }, target());
|
|
361
|
+
};
|
|
362
|
+
const dom = $mol_jsx(Button, { id: "foo", hint: "click me" }, () => 'hey!');
|
|
363
|
+
$mol_assert_equal(dom.outerHTML, '<button id="foo" title="click me" class="Button">hey!</button>');
|
|
478
364
|
},
|
|
479
|
-
'
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
365
|
+
'Nested guid generation'() {
|
|
366
|
+
const Foo = () => {
|
|
367
|
+
return $mol_jsx("div", null,
|
|
368
|
+
$mol_jsx(Bar, { id: "bar" },
|
|
369
|
+
$mol_jsx("img", { id: "icon" })));
|
|
370
|
+
};
|
|
371
|
+
const Bar = (props, icon) => {
|
|
372
|
+
return $mol_jsx("span", null,
|
|
373
|
+
icon,
|
|
374
|
+
$mol_jsx("i", { id: "label" }));
|
|
375
|
+
};
|
|
376
|
+
const dom = $mol_jsx(Foo, { id: "foo" });
|
|
377
|
+
$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>');
|
|
485
378
|
},
|
|
486
|
-
'
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
379
|
+
'Fail on non unique ids'() {
|
|
380
|
+
const App = () => {
|
|
381
|
+
return $mol_jsx("div", null,
|
|
382
|
+
$mol_jsx("span", { id: "bar" }),
|
|
383
|
+
$mol_jsx("span", { id: "bar" }));
|
|
384
|
+
};
|
|
385
|
+
$mol_assert_fail(() => $mol_jsx(App, { id: "foo" }), 'JSX already has tag with id "foo/bar"');
|
|
490
386
|
},
|
|
491
|
-
'
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
387
|
+
'Owner based guid generationn'() {
|
|
388
|
+
const Foo = () => {
|
|
389
|
+
return $mol_jsx("div", null,
|
|
390
|
+
$mol_jsx(Bar, { id: "middle", icon: () => $mol_jsx("img", { id: "icon" }) }));
|
|
391
|
+
};
|
|
392
|
+
const Bar = (props) => {
|
|
393
|
+
return $mol_jsx("span", null, props.icon());
|
|
394
|
+
};
|
|
395
|
+
const dom = $mol_jsx(Foo, { id: "app" });
|
|
396
|
+
$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>');
|
|
495
397
|
},
|
|
496
|
-
'
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
}
|
|
507
|
-
}
|
|
508
|
-
$mol_assert_ok($mol_compare_deep(new User('Jin'), new User('Jin')));
|
|
509
|
-
$mol_assert_not($mol_compare_deep(new User('Jin'), new User('John')));
|
|
398
|
+
'Fail on same ids from different caller'() {
|
|
399
|
+
const Foo = () => {
|
|
400
|
+
return $mol_jsx("div", null,
|
|
401
|
+
$mol_jsx("img", { id: "icon" }),
|
|
402
|
+
$mol_jsx(Bar, { id: "bar", icon: () => $mol_jsx("img", { id: "icon" }) }));
|
|
403
|
+
};
|
|
404
|
+
const Bar = (props) => {
|
|
405
|
+
return $mol_jsx("span", null, props.icon());
|
|
406
|
+
};
|
|
407
|
+
$mol_assert_fail(() => $mol_jsx(Foo, { id: "foo" }), 'JSX already has tag with id "foo/icon"');
|
|
510
408
|
},
|
|
511
409
|
});
|
|
512
410
|
})($ || ($ = {}));
|
|
513
|
-
//mol/
|
|
411
|
+
//mol/jsx/jsx.test.tsx
|
|
514
412
|
;
|
|
515
413
|
"use strict";
|
|
516
414
|
var $;
|
|
@@ -639,46 +537,110 @@ var $;
|
|
|
639
537
|
;
|
|
640
538
|
"use strict";
|
|
641
539
|
var $;
|
|
642
|
-
(function ($) {
|
|
643
|
-
function $mol_dom_serialize(node) {
|
|
644
|
-
const serializer = new $mol_dom_context.XMLSerializer;
|
|
645
|
-
return serializer.serializeToString(node);
|
|
646
|
-
}
|
|
647
|
-
$.$mol_dom_serialize = $mol_dom_serialize;
|
|
648
|
-
})($ || ($ = {}));
|
|
649
|
-
//mol/dom/serialize/serialize.ts
|
|
650
|
-
;
|
|
651
|
-
"use strict";
|
|
652
|
-
var $;
|
|
653
540
|
(function ($) {
|
|
654
541
|
$mol_test({
|
|
655
|
-
'
|
|
656
|
-
$
|
|
542
|
+
'nulls & undefineds'() {
|
|
543
|
+
$mol_assert_ok($mol_compare_deep(null, null));
|
|
544
|
+
$mol_assert_ok($mol_compare_deep(undefined, undefined));
|
|
545
|
+
$mol_assert_not($mol_compare_deep(undefined, null));
|
|
546
|
+
$mol_assert_not($mol_compare_deep({}, null));
|
|
657
547
|
},
|
|
658
|
-
'
|
|
659
|
-
$mol_assert_ok(1);
|
|
548
|
+
'number'() {
|
|
549
|
+
$mol_assert_ok($mol_compare_deep(1, 1));
|
|
550
|
+
$mol_assert_ok($mol_compare_deep(Number.NaN, Number.NaN));
|
|
551
|
+
$mol_assert_not($mol_compare_deep(1, 2));
|
|
552
|
+
$mol_assert_ok($mol_compare_deep(Object(1), Object(1)));
|
|
553
|
+
$mol_assert_not($mol_compare_deep(Object(1), Object(2)));
|
|
660
554
|
},
|
|
661
|
-
'
|
|
662
|
-
$
|
|
555
|
+
'POJO'() {
|
|
556
|
+
$mol_assert_ok($mol_compare_deep({}, {}));
|
|
557
|
+
$mol_assert_not($mol_compare_deep({ a: 1 }, { b: 2 }));
|
|
558
|
+
$mol_assert_not($mol_compare_deep({ a: 1 }, { a: 2 }));
|
|
559
|
+
$mol_assert_not($mol_compare_deep({}, { a: undefined }));
|
|
560
|
+
$mol_assert_ok($mol_compare_deep({ a: 1, b: 2 }, { b: 2, a: 1 }));
|
|
561
|
+
$mol_assert_ok($mol_compare_deep({ a: { b: 1 } }, { a: { b: 1 } }));
|
|
663
562
|
},
|
|
664
|
-
'
|
|
665
|
-
$
|
|
563
|
+
'Array'() {
|
|
564
|
+
$mol_assert_ok($mol_compare_deep([], []));
|
|
565
|
+
$mol_assert_ok($mol_compare_deep([1, [2]], [1, [2]]));
|
|
566
|
+
$mol_assert_not($mol_compare_deep([1, 2], [1, 3]));
|
|
567
|
+
$mol_assert_not($mol_compare_deep([1, 2,], [1, 3, undefined]));
|
|
666
568
|
},
|
|
667
|
-
'
|
|
668
|
-
|
|
569
|
+
'Non POJO are different'() {
|
|
570
|
+
class Thing extends Object {
|
|
571
|
+
}
|
|
572
|
+
$mol_assert_not($mol_compare_deep(new Thing, new Thing));
|
|
573
|
+
$mol_assert_not($mol_compare_deep(() => 1, () => 1));
|
|
574
|
+
$mol_assert_not($mol_compare_deep(new RangeError('Test error'), new RangeError('Test error')));
|
|
669
575
|
},
|
|
670
|
-
'
|
|
671
|
-
|
|
576
|
+
'same POJOs with cyclic reference'() {
|
|
577
|
+
const a = { foo: {} };
|
|
578
|
+
a['self'] = a;
|
|
579
|
+
const b = { foo: {} };
|
|
580
|
+
b['self'] = b;
|
|
581
|
+
$mol_assert_ok($mol_compare_deep(a, b));
|
|
672
582
|
},
|
|
673
|
-
'
|
|
674
|
-
$
|
|
583
|
+
'Date'() {
|
|
584
|
+
$mol_assert_ok($mol_compare_deep(new Date(12345), new Date(12345)));
|
|
585
|
+
$mol_assert_not($mol_compare_deep(new Date(12345), new Date(12346)));
|
|
675
586
|
},
|
|
676
|
-
'
|
|
677
|
-
$
|
|
587
|
+
'RegExp'() {
|
|
588
|
+
$mol_assert_ok($mol_compare_deep(/\x22/mig, /\x22/mig));
|
|
589
|
+
$mol_assert_not($mol_compare_deep(/\x22/mig, /\x21/mig));
|
|
590
|
+
$mol_assert_not($mol_compare_deep(/\x22/mig, /\x22/mg));
|
|
591
|
+
},
|
|
592
|
+
'Error'() {
|
|
593
|
+
$mol_assert_not($mol_compare_deep(new Error('xxx'), new Error('xxx')));
|
|
594
|
+
const fail = (message) => new Error(message);
|
|
595
|
+
$mol_assert_ok($mol_compare_deep(...['xxx', 'xxx'].map(msg => new Error(msg))));
|
|
596
|
+
$mol_assert_not($mol_compare_deep(...['xxx', 'yyy'].map(msg => new Error(msg))));
|
|
597
|
+
},
|
|
598
|
+
'Map'() {
|
|
599
|
+
$mol_assert_ok($mol_compare_deep(new Map, new Map));
|
|
600
|
+
$mol_assert_ok($mol_compare_deep(new Map([[1, [2]]]), new Map([[1, [2]]])));
|
|
601
|
+
$mol_assert_ok($mol_compare_deep(new Map([[[1], 2]]), new Map([[[1], 2]])));
|
|
602
|
+
$mol_assert_not($mol_compare_deep(new Map([[1, 2]]), new Map([[1, 3]])));
|
|
603
|
+
$mol_assert_not($mol_compare_deep(new Map([[[1], 2]]), new Map([[[3], 2]])));
|
|
604
|
+
},
|
|
605
|
+
'Set'() {
|
|
606
|
+
$mol_assert_ok($mol_compare_deep(new Set, new Set));
|
|
607
|
+
$mol_assert_ok($mol_compare_deep(new Set([1, [2]]), new Set([1, [2]])));
|
|
608
|
+
$mol_assert_not($mol_compare_deep(new Set([1]), new Set([2])));
|
|
609
|
+
},
|
|
610
|
+
'Uint8Array'() {
|
|
611
|
+
$mol_assert_ok($mol_compare_deep(new Uint8Array, new Uint8Array));
|
|
612
|
+
$mol_assert_ok($mol_compare_deep(new Uint8Array([0]), new Uint8Array([0])));
|
|
613
|
+
$mol_assert_not($mol_compare_deep(new Uint8Array([0]), new Uint8Array([1])));
|
|
614
|
+
},
|
|
615
|
+
'Custom comparator'() {
|
|
616
|
+
class User {
|
|
617
|
+
name;
|
|
618
|
+
rand;
|
|
619
|
+
constructor(name, rand = Math.random()) {
|
|
620
|
+
this.name = name;
|
|
621
|
+
this.rand = rand;
|
|
622
|
+
}
|
|
623
|
+
[Symbol.toPrimitive](mode) {
|
|
624
|
+
return this.name;
|
|
625
|
+
}
|
|
626
|
+
}
|
|
627
|
+
$mol_assert_ok($mol_compare_deep(new User('Jin'), new User('Jin')));
|
|
628
|
+
$mol_assert_not($mol_compare_deep(new User('Jin'), new User('John')));
|
|
678
629
|
},
|
|
679
630
|
});
|
|
680
631
|
})($ || ($ = {}));
|
|
681
|
-
//mol/
|
|
632
|
+
//mol/compare/deep/deep.test.tsx
|
|
633
|
+
;
|
|
634
|
+
"use strict";
|
|
635
|
+
var $;
|
|
636
|
+
(function ($) {
|
|
637
|
+
function $mol_dom_serialize(node) {
|
|
638
|
+
const serializer = new $mol_dom_context.XMLSerializer;
|
|
639
|
+
return serializer.serializeToString(node);
|
|
640
|
+
}
|
|
641
|
+
$.$mol_dom_serialize = $mol_dom_serialize;
|
|
642
|
+
})($ || ($ = {}));
|
|
643
|
+
//mol/dom/serialize/serialize.ts
|
|
682
644
|
;
|
|
683
645
|
"use strict";
|
|
684
646
|
var $;
|
|
@@ -776,6 +738,38 @@ var $;
|
|
|
776
738
|
;
|
|
777
739
|
"use strict";
|
|
778
740
|
var $;
|
|
741
|
+
(function ($) {
|
|
742
|
+
$mol_test({
|
|
743
|
+
'must be false'() {
|
|
744
|
+
$mol_assert_not(0);
|
|
745
|
+
},
|
|
746
|
+
'must be true'() {
|
|
747
|
+
$mol_assert_ok(1);
|
|
748
|
+
},
|
|
749
|
+
'two must be equal'() {
|
|
750
|
+
$mol_assert_equal(2, 2);
|
|
751
|
+
},
|
|
752
|
+
'three must be equal'() {
|
|
753
|
+
$mol_assert_equal(2, 2, 2);
|
|
754
|
+
},
|
|
755
|
+
'two must be unique'() {
|
|
756
|
+
$mol_assert_unique([3], [3]);
|
|
757
|
+
},
|
|
758
|
+
'three must be unique'() {
|
|
759
|
+
$mol_assert_unique([3], [3], [3]);
|
|
760
|
+
},
|
|
761
|
+
'two must be alike'() {
|
|
762
|
+
$mol_assert_like([3], [3]);
|
|
763
|
+
},
|
|
764
|
+
'three must be alike'() {
|
|
765
|
+
$mol_assert_like([3], [3], [3]);
|
|
766
|
+
},
|
|
767
|
+
});
|
|
768
|
+
})($ || ($ = {}));
|
|
769
|
+
//mol/assert/assert.test.ts
|
|
770
|
+
;
|
|
771
|
+
"use strict";
|
|
772
|
+
var $;
|
|
779
773
|
(function ($) {
|
|
780
774
|
function $mol_log3_area_lazy(event) {
|
|
781
775
|
const self = this;
|
|
@@ -799,24 +793,16 @@ var $;
|
|
|
799
793
|
//mol/log3/log3.ts
|
|
800
794
|
;
|
|
801
795
|
"use strict";
|
|
802
|
-
//mol/type/
|
|
796
|
+
//mol/type/equals/equals.ts
|
|
797
|
+
;
|
|
798
|
+
"use strict";
|
|
799
|
+
//mol/type/equals/equals.test.ts
|
|
803
800
|
;
|
|
804
801
|
"use strict";
|
|
805
802
|
//mol/type/keys/extract/extract.ts
|
|
806
803
|
;
|
|
807
804
|
"use strict";
|
|
808
|
-
|
|
809
|
-
(function ($_1) {
|
|
810
|
-
$mol_test_mocks.push($ => {
|
|
811
|
-
$.$mol_log3_come = () => { };
|
|
812
|
-
$.$mol_log3_done = () => { };
|
|
813
|
-
$.$mol_log3_fail = () => { };
|
|
814
|
-
$.$mol_log3_warn = () => { };
|
|
815
|
-
$.$mol_log3_rise = () => { };
|
|
816
|
-
$.$mol_log3_area = () => () => { };
|
|
817
|
-
});
|
|
818
|
-
})($ || ($ = {}));
|
|
819
|
-
//mol/log3/log3.test.ts
|
|
805
|
+
//mol/type/keys/extract/extract.test.ts
|
|
820
806
|
;
|
|
821
807
|
"use strict";
|
|
822
808
|
var $;
|
|
@@ -850,16 +836,16 @@ var $;
|
|
|
850
836
|
"use strict";
|
|
851
837
|
var $;
|
|
852
838
|
(function ($_1) {
|
|
853
|
-
$
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
}
|
|
839
|
+
$mol_test_mocks.push($ => {
|
|
840
|
+
$.$mol_log3_come = () => { };
|
|
841
|
+
$.$mol_log3_done = () => { };
|
|
842
|
+
$.$mol_log3_fail = () => { };
|
|
843
|
+
$.$mol_log3_warn = () => { };
|
|
844
|
+
$.$mol_log3_rise = () => { };
|
|
845
|
+
$.$mol_log3_area = () => () => { };
|
|
860
846
|
});
|
|
861
847
|
})($ || ($ = {}));
|
|
862
|
-
//mol/
|
|
848
|
+
//mol/log3/log3.test.ts
|
|
863
849
|
;
|
|
864
850
|
"use strict";
|
|
865
851
|
var $;
|
|
@@ -895,6 +881,20 @@ var $;
|
|
|
895
881
|
;
|
|
896
882
|
"use strict";
|
|
897
883
|
var $;
|
|
884
|
+
(function ($_1) {
|
|
885
|
+
$mol_test({
|
|
886
|
+
'FQN of anon function'($) {
|
|
887
|
+
const $$ = Object.assign($, { $mol_func_name_test: (() => () => { })() });
|
|
888
|
+
$mol_assert_equal($$.$mol_func_name_test.name, '');
|
|
889
|
+
$mol_assert_equal($$.$mol_func_name($$.$mol_func_name_test), '$mol_func_name_test');
|
|
890
|
+
$mol_assert_equal($$.$mol_func_name_test.name, '$mol_func_name_test');
|
|
891
|
+
},
|
|
892
|
+
});
|
|
893
|
+
})($ || ($ = {}));
|
|
894
|
+
//mol/func/name/name.test.ts
|
|
895
|
+
;
|
|
896
|
+
"use strict";
|
|
897
|
+
var $;
|
|
898
898
|
(function ($) {
|
|
899
899
|
$mol_test({
|
|
900
900
|
async 'sizes'() {
|