mol_db 0.0.573 → 0.0.574
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 +323 -323
- 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
|
@@ -175,112 +175,16 @@ var $;
|
|
|
175
175
|
//mol/type/error/error.ts
|
|
176
176
|
;
|
|
177
177
|
"use strict";
|
|
178
|
-
//mol/type/assert/assert.test.ts
|
|
179
|
-
;
|
|
180
|
-
"use strict";
|
|
181
178
|
//mol/type/assert/assert.ts
|
|
182
179
|
;
|
|
183
180
|
"use strict";
|
|
184
|
-
//mol/type/
|
|
185
|
-
;
|
|
186
|
-
"use strict";
|
|
187
|
-
//mol/type/equals/equals.ts
|
|
188
|
-
;
|
|
189
|
-
"use strict";
|
|
190
|
-
//mol/type/partial/deep/deep.test.ts
|
|
181
|
+
//mol/type/assert/assert.test.ts
|
|
191
182
|
;
|
|
192
183
|
"use strict";
|
|
193
184
|
//mol/type/partial/deep/deep.ts
|
|
194
185
|
;
|
|
195
186
|
"use strict";
|
|
196
|
-
|
|
197
|
-
(function ($) {
|
|
198
|
-
$mol_test({
|
|
199
|
-
'Make empty div'() {
|
|
200
|
-
$mol_assert_equal(($mol_jsx("div", null)).outerHTML, '<div></div>');
|
|
201
|
-
},
|
|
202
|
-
'Define native field'() {
|
|
203
|
-
const dom = $mol_jsx("input", { value: '123' });
|
|
204
|
-
$mol_assert_equal(dom.outerHTML, '<input value="123">');
|
|
205
|
-
$mol_assert_equal(dom.value, '123');
|
|
206
|
-
},
|
|
207
|
-
'Define classes'() {
|
|
208
|
-
const dom = $mol_jsx("div", { class: 'foo bar' });
|
|
209
|
-
$mol_assert_equal(dom.outerHTML, '<div class="foo bar"></div>');
|
|
210
|
-
},
|
|
211
|
-
'Define styles'() {
|
|
212
|
-
const dom = $mol_jsx("div", { style: { color: 'red' } });
|
|
213
|
-
$mol_assert_equal(dom.outerHTML, '<div style="color: red;"></div>');
|
|
214
|
-
},
|
|
215
|
-
'Define dataset'() {
|
|
216
|
-
const dom = $mol_jsx("div", { dataset: { foo: 'bar' } });
|
|
217
|
-
$mol_assert_equal(dom.outerHTML, '<div data-foo="bar"></div>');
|
|
218
|
-
},
|
|
219
|
-
'Define attributes'() {
|
|
220
|
-
const dom = $mol_jsx("div", { lang: "ru", hidden: true });
|
|
221
|
-
$mol_assert_equal(dom.outerHTML, '<div lang="ru" hidden=""></div>');
|
|
222
|
-
},
|
|
223
|
-
'Define child nodes'() {
|
|
224
|
-
const dom = $mol_jsx("div", null,
|
|
225
|
-
"hello",
|
|
226
|
-
$mol_jsx("strong", null, "world"),
|
|
227
|
-
"!");
|
|
228
|
-
$mol_assert_equal(dom.outerHTML, '<div>hello<strong>world</strong>!</div>');
|
|
229
|
-
},
|
|
230
|
-
'Function as component'() {
|
|
231
|
-
const Button = (props, target) => {
|
|
232
|
-
return $mol_jsx("button", { title: props.hint }, target());
|
|
233
|
-
};
|
|
234
|
-
const dom = $mol_jsx(Button, { id: "foo", hint: "click me" }, () => 'hey!');
|
|
235
|
-
$mol_assert_equal(dom.outerHTML, '<button id="foo" title="click me" class="Button">hey!</button>');
|
|
236
|
-
},
|
|
237
|
-
'Nested guid generation'() {
|
|
238
|
-
const Foo = () => {
|
|
239
|
-
return $mol_jsx("div", null,
|
|
240
|
-
$mol_jsx(Bar, { id: "bar" },
|
|
241
|
-
$mol_jsx("img", { id: "icon" })));
|
|
242
|
-
};
|
|
243
|
-
const Bar = (props, icon) => {
|
|
244
|
-
return $mol_jsx("span", null,
|
|
245
|
-
icon,
|
|
246
|
-
$mol_jsx("i", { id: "label" }));
|
|
247
|
-
};
|
|
248
|
-
const dom = $mol_jsx(Foo, { id: "foo" });
|
|
249
|
-
$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>');
|
|
250
|
-
},
|
|
251
|
-
'Fail on non unique ids'() {
|
|
252
|
-
const App = () => {
|
|
253
|
-
return $mol_jsx("div", null,
|
|
254
|
-
$mol_jsx("span", { id: "bar" }),
|
|
255
|
-
$mol_jsx("span", { id: "bar" }));
|
|
256
|
-
};
|
|
257
|
-
$mol_assert_fail(() => $mol_jsx(App, { id: "foo" }), 'JSX already has tag with id "foo/bar"');
|
|
258
|
-
},
|
|
259
|
-
'Owner based guid generationn'() {
|
|
260
|
-
const Foo = () => {
|
|
261
|
-
return $mol_jsx("div", null,
|
|
262
|
-
$mol_jsx(Bar, { id: "middle", icon: () => $mol_jsx("img", { id: "icon" }) }));
|
|
263
|
-
};
|
|
264
|
-
const Bar = (props) => {
|
|
265
|
-
return $mol_jsx("span", null, props.icon());
|
|
266
|
-
};
|
|
267
|
-
const dom = $mol_jsx(Foo, { id: "app" });
|
|
268
|
-
$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>');
|
|
269
|
-
},
|
|
270
|
-
'Fail on same ids from different caller'() {
|
|
271
|
-
const Foo = () => {
|
|
272
|
-
return $mol_jsx("div", null,
|
|
273
|
-
$mol_jsx("img", { id: "icon" }),
|
|
274
|
-
$mol_jsx(Bar, { id: "bar", icon: () => $mol_jsx("img", { id: "icon" }) }));
|
|
275
|
-
};
|
|
276
|
-
const Bar = (props) => {
|
|
277
|
-
return $mol_jsx("span", null, props.icon());
|
|
278
|
-
};
|
|
279
|
-
$mol_assert_fail(() => $mol_jsx(Foo, { id: "foo" }), 'JSX already has tag with id "foo/icon"');
|
|
280
|
-
},
|
|
281
|
-
});
|
|
282
|
-
})($ || ($ = {}));
|
|
283
|
-
//mol/jsx/jsx.test.tsx
|
|
187
|
+
//mol/type/partial/deep/deep.test.ts
|
|
284
188
|
;
|
|
285
189
|
"use strict";
|
|
286
190
|
var $;
|
|
@@ -407,97 +311,91 @@ var $;
|
|
|
407
311
|
var $;
|
|
408
312
|
(function ($) {
|
|
409
313
|
$mol_test({
|
|
410
|
-
'
|
|
411
|
-
$
|
|
412
|
-
$mol_assert_ok($mol_compare_deep(undefined, undefined));
|
|
413
|
-
$mol_assert_not($mol_compare_deep(undefined, null));
|
|
414
|
-
$mol_assert_not($mol_compare_deep({}, null));
|
|
415
|
-
},
|
|
416
|
-
'number'() {
|
|
417
|
-
$mol_assert_ok($mol_compare_deep(1, 1));
|
|
418
|
-
$mol_assert_ok($mol_compare_deep(Number.NaN, Number.NaN));
|
|
419
|
-
$mol_assert_not($mol_compare_deep(1, 2));
|
|
420
|
-
$mol_assert_ok($mol_compare_deep(Object(1), Object(1)));
|
|
421
|
-
$mol_assert_not($mol_compare_deep(Object(1), Object(2)));
|
|
314
|
+
'Make empty div'() {
|
|
315
|
+
$mol_assert_equal(($mol_jsx("div", null)).outerHTML, '<div></div>');
|
|
422
316
|
},
|
|
423
|
-
'
|
|
424
|
-
$
|
|
425
|
-
$
|
|
426
|
-
$
|
|
427
|
-
$mol_assert_not($mol_compare_deep({}, { a: undefined }));
|
|
428
|
-
$mol_assert_ok($mol_compare_deep({ a: 1, b: 2 }, { b: 2, a: 1 }));
|
|
429
|
-
$mol_assert_ok($mol_compare_deep({ a: { b: 1 } }, { a: { b: 1 } }));
|
|
317
|
+
'Define native field'() {
|
|
318
|
+
const dom = $mol_jsx("input", { value: '123' });
|
|
319
|
+
$mol_assert_equal(dom.outerHTML, '<input value="123">');
|
|
320
|
+
$mol_assert_equal(dom.value, '123');
|
|
430
321
|
},
|
|
431
|
-
'
|
|
432
|
-
$
|
|
433
|
-
$
|
|
434
|
-
$mol_assert_not($mol_compare_deep([1, 2], [1, 3]));
|
|
435
|
-
$mol_assert_not($mol_compare_deep([1, 2,], [1, 3, undefined]));
|
|
322
|
+
'Define classes'() {
|
|
323
|
+
const dom = $mol_jsx("div", { class: 'foo bar' });
|
|
324
|
+
$mol_assert_equal(dom.outerHTML, '<div class="foo bar"></div>');
|
|
436
325
|
},
|
|
437
|
-
'
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
$mol_assert_not($mol_compare_deep(new Thing, new Thing));
|
|
441
|
-
$mol_assert_not($mol_compare_deep(() => 1, () => 1));
|
|
442
|
-
$mol_assert_not($mol_compare_deep(new RangeError('Test error'), new RangeError('Test error')));
|
|
326
|
+
'Define styles'() {
|
|
327
|
+
const dom = $mol_jsx("div", { style: { color: 'red' } });
|
|
328
|
+
$mol_assert_equal(dom.outerHTML, '<div style="color: red;"></div>');
|
|
443
329
|
},
|
|
444
|
-
'
|
|
445
|
-
const
|
|
446
|
-
|
|
447
|
-
const b = { foo: {} };
|
|
448
|
-
b['self'] = b;
|
|
449
|
-
$mol_assert_ok($mol_compare_deep(a, b));
|
|
330
|
+
'Define dataset'() {
|
|
331
|
+
const dom = $mol_jsx("div", { dataset: { foo: 'bar' } });
|
|
332
|
+
$mol_assert_equal(dom.outerHTML, '<div data-foo="bar"></div>');
|
|
450
333
|
},
|
|
451
|
-
'
|
|
452
|
-
$
|
|
453
|
-
$
|
|
334
|
+
'Define attributes'() {
|
|
335
|
+
const dom = $mol_jsx("div", { lang: "ru", hidden: true });
|
|
336
|
+
$mol_assert_equal(dom.outerHTML, '<div lang="ru" hidden=""></div>');
|
|
454
337
|
},
|
|
455
|
-
'
|
|
456
|
-
$
|
|
457
|
-
|
|
458
|
-
|
|
338
|
+
'Define child nodes'() {
|
|
339
|
+
const dom = $mol_jsx("div", null,
|
|
340
|
+
"hello",
|
|
341
|
+
$mol_jsx("strong", null, "world"),
|
|
342
|
+
"!");
|
|
343
|
+
$mol_assert_equal(dom.outerHTML, '<div>hello<strong>world</strong>!</div>');
|
|
459
344
|
},
|
|
460
|
-
'
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
$
|
|
345
|
+
'Function as component'() {
|
|
346
|
+
const Button = (props, target) => {
|
|
347
|
+
return $mol_jsx("button", { title: props.hint }, target());
|
|
348
|
+
};
|
|
349
|
+
const dom = $mol_jsx(Button, { id: "foo", hint: "click me" }, () => 'hey!');
|
|
350
|
+
$mol_assert_equal(dom.outerHTML, '<button id="foo" title="click me" class="Button">hey!</button>');
|
|
465
351
|
},
|
|
466
|
-
'
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
352
|
+
'Nested guid generation'() {
|
|
353
|
+
const Foo = () => {
|
|
354
|
+
return $mol_jsx("div", null,
|
|
355
|
+
$mol_jsx(Bar, { id: "bar" },
|
|
356
|
+
$mol_jsx("img", { id: "icon" })));
|
|
357
|
+
};
|
|
358
|
+
const Bar = (props, icon) => {
|
|
359
|
+
return $mol_jsx("span", null,
|
|
360
|
+
icon,
|
|
361
|
+
$mol_jsx("i", { id: "label" }));
|
|
362
|
+
};
|
|
363
|
+
const dom = $mol_jsx(Foo, { id: "foo" });
|
|
364
|
+
$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>');
|
|
472
365
|
},
|
|
473
|
-
'
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
366
|
+
'Fail on non unique ids'() {
|
|
367
|
+
const App = () => {
|
|
368
|
+
return $mol_jsx("div", null,
|
|
369
|
+
$mol_jsx("span", { id: "bar" }),
|
|
370
|
+
$mol_jsx("span", { id: "bar" }));
|
|
371
|
+
};
|
|
372
|
+
$mol_assert_fail(() => $mol_jsx(App, { id: "foo" }), 'JSX already has tag with id "foo/bar"');
|
|
477
373
|
},
|
|
478
|
-
'
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
374
|
+
'Owner based guid generationn'() {
|
|
375
|
+
const Foo = () => {
|
|
376
|
+
return $mol_jsx("div", null,
|
|
377
|
+
$mol_jsx(Bar, { id: "middle", icon: () => $mol_jsx("img", { id: "icon" }) }));
|
|
378
|
+
};
|
|
379
|
+
const Bar = (props) => {
|
|
380
|
+
return $mol_jsx("span", null, props.icon());
|
|
381
|
+
};
|
|
382
|
+
const dom = $mol_jsx(Foo, { id: "app" });
|
|
383
|
+
$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>');
|
|
482
384
|
},
|
|
483
|
-
'
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
}
|
|
494
|
-
}
|
|
495
|
-
$mol_assert_ok($mol_compare_deep(new User('Jin'), new User('Jin')));
|
|
496
|
-
$mol_assert_not($mol_compare_deep(new User('Jin'), new User('John')));
|
|
385
|
+
'Fail on same ids from different caller'() {
|
|
386
|
+
const Foo = () => {
|
|
387
|
+
return $mol_jsx("div", null,
|
|
388
|
+
$mol_jsx("img", { id: "icon" }),
|
|
389
|
+
$mol_jsx(Bar, { id: "bar", icon: () => $mol_jsx("img", { id: "icon" }) }));
|
|
390
|
+
};
|
|
391
|
+
const Bar = (props) => {
|
|
392
|
+
return $mol_jsx("span", null, props.icon());
|
|
393
|
+
};
|
|
394
|
+
$mol_assert_fail(() => $mol_jsx(Foo, { id: "foo" }), 'JSX already has tag with id "foo/icon"');
|
|
497
395
|
},
|
|
498
396
|
});
|
|
499
397
|
})($ || ($ = {}));
|
|
500
|
-
//mol/
|
|
398
|
+
//mol/jsx/jsx.test.tsx
|
|
501
399
|
;
|
|
502
400
|
"use strict";
|
|
503
401
|
var $;
|
|
@@ -626,46 +524,110 @@ var $;
|
|
|
626
524
|
;
|
|
627
525
|
"use strict";
|
|
628
526
|
var $;
|
|
629
|
-
(function ($) {
|
|
630
|
-
function $mol_dom_serialize(node) {
|
|
631
|
-
const serializer = new $mol_dom_context.XMLSerializer;
|
|
632
|
-
return serializer.serializeToString(node);
|
|
633
|
-
}
|
|
634
|
-
$.$mol_dom_serialize = $mol_dom_serialize;
|
|
635
|
-
})($ || ($ = {}));
|
|
636
|
-
//mol/dom/serialize/serialize.ts
|
|
637
|
-
;
|
|
638
|
-
"use strict";
|
|
639
|
-
var $;
|
|
640
527
|
(function ($) {
|
|
641
528
|
$mol_test({
|
|
642
|
-
'
|
|
643
|
-
$
|
|
529
|
+
'nulls & undefineds'() {
|
|
530
|
+
$mol_assert_ok($mol_compare_deep(null, null));
|
|
531
|
+
$mol_assert_ok($mol_compare_deep(undefined, undefined));
|
|
532
|
+
$mol_assert_not($mol_compare_deep(undefined, null));
|
|
533
|
+
$mol_assert_not($mol_compare_deep({}, null));
|
|
644
534
|
},
|
|
645
|
-
'
|
|
646
|
-
$mol_assert_ok(1);
|
|
535
|
+
'number'() {
|
|
536
|
+
$mol_assert_ok($mol_compare_deep(1, 1));
|
|
537
|
+
$mol_assert_ok($mol_compare_deep(Number.NaN, Number.NaN));
|
|
538
|
+
$mol_assert_not($mol_compare_deep(1, 2));
|
|
539
|
+
$mol_assert_ok($mol_compare_deep(Object(1), Object(1)));
|
|
540
|
+
$mol_assert_not($mol_compare_deep(Object(1), Object(2)));
|
|
647
541
|
},
|
|
648
|
-
'
|
|
649
|
-
$
|
|
542
|
+
'POJO'() {
|
|
543
|
+
$mol_assert_ok($mol_compare_deep({}, {}));
|
|
544
|
+
$mol_assert_not($mol_compare_deep({ a: 1 }, { b: 2 }));
|
|
545
|
+
$mol_assert_not($mol_compare_deep({ a: 1 }, { a: 2 }));
|
|
546
|
+
$mol_assert_not($mol_compare_deep({}, { a: undefined }));
|
|
547
|
+
$mol_assert_ok($mol_compare_deep({ a: 1, b: 2 }, { b: 2, a: 1 }));
|
|
548
|
+
$mol_assert_ok($mol_compare_deep({ a: { b: 1 } }, { a: { b: 1 } }));
|
|
650
549
|
},
|
|
651
|
-
'
|
|
652
|
-
$
|
|
550
|
+
'Array'() {
|
|
551
|
+
$mol_assert_ok($mol_compare_deep([], []));
|
|
552
|
+
$mol_assert_ok($mol_compare_deep([1, [2]], [1, [2]]));
|
|
553
|
+
$mol_assert_not($mol_compare_deep([1, 2], [1, 3]));
|
|
554
|
+
$mol_assert_not($mol_compare_deep([1, 2,], [1, 3, undefined]));
|
|
653
555
|
},
|
|
654
|
-
'
|
|
655
|
-
|
|
556
|
+
'Non POJO are different'() {
|
|
557
|
+
class Thing extends Object {
|
|
558
|
+
}
|
|
559
|
+
$mol_assert_not($mol_compare_deep(new Thing, new Thing));
|
|
560
|
+
$mol_assert_not($mol_compare_deep(() => 1, () => 1));
|
|
561
|
+
$mol_assert_not($mol_compare_deep(new RangeError('Test error'), new RangeError('Test error')));
|
|
656
562
|
},
|
|
657
|
-
'
|
|
658
|
-
|
|
563
|
+
'same POJOs with cyclic reference'() {
|
|
564
|
+
const a = { foo: {} };
|
|
565
|
+
a['self'] = a;
|
|
566
|
+
const b = { foo: {} };
|
|
567
|
+
b['self'] = b;
|
|
568
|
+
$mol_assert_ok($mol_compare_deep(a, b));
|
|
659
569
|
},
|
|
660
|
-
'
|
|
661
|
-
$
|
|
570
|
+
'Date'() {
|
|
571
|
+
$mol_assert_ok($mol_compare_deep(new Date(12345), new Date(12345)));
|
|
572
|
+
$mol_assert_not($mol_compare_deep(new Date(12345), new Date(12346)));
|
|
662
573
|
},
|
|
663
|
-
'
|
|
664
|
-
$
|
|
574
|
+
'RegExp'() {
|
|
575
|
+
$mol_assert_ok($mol_compare_deep(/\x22/mig, /\x22/mig));
|
|
576
|
+
$mol_assert_not($mol_compare_deep(/\x22/mig, /\x21/mig));
|
|
577
|
+
$mol_assert_not($mol_compare_deep(/\x22/mig, /\x22/mg));
|
|
578
|
+
},
|
|
579
|
+
'Error'() {
|
|
580
|
+
$mol_assert_not($mol_compare_deep(new Error('xxx'), new Error('xxx')));
|
|
581
|
+
const fail = (message) => new Error(message);
|
|
582
|
+
$mol_assert_ok($mol_compare_deep(...['xxx', 'xxx'].map(msg => new Error(msg))));
|
|
583
|
+
$mol_assert_not($mol_compare_deep(...['xxx', 'yyy'].map(msg => new Error(msg))));
|
|
584
|
+
},
|
|
585
|
+
'Map'() {
|
|
586
|
+
$mol_assert_ok($mol_compare_deep(new Map, new Map));
|
|
587
|
+
$mol_assert_ok($mol_compare_deep(new Map([[1, [2]]]), new Map([[1, [2]]])));
|
|
588
|
+
$mol_assert_ok($mol_compare_deep(new Map([[[1], 2]]), new Map([[[1], 2]])));
|
|
589
|
+
$mol_assert_not($mol_compare_deep(new Map([[1, 2]]), new Map([[1, 3]])));
|
|
590
|
+
$mol_assert_not($mol_compare_deep(new Map([[[1], 2]]), new Map([[[3], 2]])));
|
|
591
|
+
},
|
|
592
|
+
'Set'() {
|
|
593
|
+
$mol_assert_ok($mol_compare_deep(new Set, new Set));
|
|
594
|
+
$mol_assert_ok($mol_compare_deep(new Set([1, [2]]), new Set([1, [2]])));
|
|
595
|
+
$mol_assert_not($mol_compare_deep(new Set([1]), new Set([2])));
|
|
596
|
+
},
|
|
597
|
+
'Uint8Array'() {
|
|
598
|
+
$mol_assert_ok($mol_compare_deep(new Uint8Array, new Uint8Array));
|
|
599
|
+
$mol_assert_ok($mol_compare_deep(new Uint8Array([0]), new Uint8Array([0])));
|
|
600
|
+
$mol_assert_not($mol_compare_deep(new Uint8Array([0]), new Uint8Array([1])));
|
|
601
|
+
},
|
|
602
|
+
'Custom comparator'() {
|
|
603
|
+
class User {
|
|
604
|
+
name;
|
|
605
|
+
rand;
|
|
606
|
+
constructor(name, rand = Math.random()) {
|
|
607
|
+
this.name = name;
|
|
608
|
+
this.rand = rand;
|
|
609
|
+
}
|
|
610
|
+
[Symbol.toPrimitive](mode) {
|
|
611
|
+
return this.name;
|
|
612
|
+
}
|
|
613
|
+
}
|
|
614
|
+
$mol_assert_ok($mol_compare_deep(new User('Jin'), new User('Jin')));
|
|
615
|
+
$mol_assert_not($mol_compare_deep(new User('Jin'), new User('John')));
|
|
665
616
|
},
|
|
666
617
|
});
|
|
667
618
|
})($ || ($ = {}));
|
|
668
|
-
//mol/
|
|
619
|
+
//mol/compare/deep/deep.test.tsx
|
|
620
|
+
;
|
|
621
|
+
"use strict";
|
|
622
|
+
var $;
|
|
623
|
+
(function ($) {
|
|
624
|
+
function $mol_dom_serialize(node) {
|
|
625
|
+
const serializer = new $mol_dom_context.XMLSerializer;
|
|
626
|
+
return serializer.serializeToString(node);
|
|
627
|
+
}
|
|
628
|
+
$.$mol_dom_serialize = $mol_dom_serialize;
|
|
629
|
+
})($ || ($ = {}));
|
|
630
|
+
//mol/dom/serialize/serialize.ts
|
|
669
631
|
;
|
|
670
632
|
"use strict";
|
|
671
633
|
var $;
|
|
@@ -763,6 +725,38 @@ var $;
|
|
|
763
725
|
;
|
|
764
726
|
"use strict";
|
|
765
727
|
var $;
|
|
728
|
+
(function ($) {
|
|
729
|
+
$mol_test({
|
|
730
|
+
'must be false'() {
|
|
731
|
+
$mol_assert_not(0);
|
|
732
|
+
},
|
|
733
|
+
'must be true'() {
|
|
734
|
+
$mol_assert_ok(1);
|
|
735
|
+
},
|
|
736
|
+
'two must be equal'() {
|
|
737
|
+
$mol_assert_equal(2, 2);
|
|
738
|
+
},
|
|
739
|
+
'three must be equal'() {
|
|
740
|
+
$mol_assert_equal(2, 2, 2);
|
|
741
|
+
},
|
|
742
|
+
'two must be unique'() {
|
|
743
|
+
$mol_assert_unique([3], [3]);
|
|
744
|
+
},
|
|
745
|
+
'three must be unique'() {
|
|
746
|
+
$mol_assert_unique([3], [3], [3]);
|
|
747
|
+
},
|
|
748
|
+
'two must be alike'() {
|
|
749
|
+
$mol_assert_like([3], [3]);
|
|
750
|
+
},
|
|
751
|
+
'three must be alike'() {
|
|
752
|
+
$mol_assert_like([3], [3], [3]);
|
|
753
|
+
},
|
|
754
|
+
});
|
|
755
|
+
})($ || ($ = {}));
|
|
756
|
+
//mol/assert/assert.test.ts
|
|
757
|
+
;
|
|
758
|
+
"use strict";
|
|
759
|
+
var $;
|
|
766
760
|
(function ($) {
|
|
767
761
|
$mol_test({
|
|
768
762
|
async 'put, get, drop, count records and clear store'() {
|
|
@@ -837,24 +831,16 @@ var $;
|
|
|
837
831
|
//mol/log3/log3.ts
|
|
838
832
|
;
|
|
839
833
|
"use strict";
|
|
840
|
-
//mol/type/
|
|
834
|
+
//mol/type/equals/equals.ts
|
|
835
|
+
;
|
|
836
|
+
"use strict";
|
|
837
|
+
//mol/type/equals/equals.test.ts
|
|
841
838
|
;
|
|
842
839
|
"use strict";
|
|
843
840
|
//mol/type/keys/extract/extract.ts
|
|
844
841
|
;
|
|
845
842
|
"use strict";
|
|
846
|
-
|
|
847
|
-
(function ($_1) {
|
|
848
|
-
$mol_test_mocks.push($ => {
|
|
849
|
-
$.$mol_log3_come = () => { };
|
|
850
|
-
$.$mol_log3_done = () => { };
|
|
851
|
-
$.$mol_log3_fail = () => { };
|
|
852
|
-
$.$mol_log3_warn = () => { };
|
|
853
|
-
$.$mol_log3_rise = () => { };
|
|
854
|
-
$.$mol_log3_area = () => () => { };
|
|
855
|
-
});
|
|
856
|
-
})($ || ($ = {}));
|
|
857
|
-
//mol/log3/log3.test.ts
|
|
843
|
+
//mol/type/keys/extract/extract.test.ts
|
|
858
844
|
;
|
|
859
845
|
"use strict";
|
|
860
846
|
var $;
|
|
@@ -888,16 +874,16 @@ var $;
|
|
|
888
874
|
"use strict";
|
|
889
875
|
var $;
|
|
890
876
|
(function ($_1) {
|
|
891
|
-
$
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
}
|
|
877
|
+
$mol_test_mocks.push($ => {
|
|
878
|
+
$.$mol_log3_come = () => { };
|
|
879
|
+
$.$mol_log3_done = () => { };
|
|
880
|
+
$.$mol_log3_fail = () => { };
|
|
881
|
+
$.$mol_log3_warn = () => { };
|
|
882
|
+
$.$mol_log3_rise = () => { };
|
|
883
|
+
$.$mol_log3_area = () => () => { };
|
|
898
884
|
});
|
|
899
885
|
})($ || ($ = {}));
|
|
900
|
-
//mol/
|
|
886
|
+
//mol/log3/log3.test.ts
|
|
901
887
|
;
|
|
902
888
|
"use strict";
|
|
903
889
|
var $;
|
|
@@ -933,6 +919,20 @@ var $;
|
|
|
933
919
|
;
|
|
934
920
|
"use strict";
|
|
935
921
|
var $;
|
|
922
|
+
(function ($_1) {
|
|
923
|
+
$mol_test({
|
|
924
|
+
'FQN of anon function'($) {
|
|
925
|
+
const $$ = Object.assign($, { $mol_func_name_test: (() => () => { })() });
|
|
926
|
+
$mol_assert_equal($$.$mol_func_name_test.name, '');
|
|
927
|
+
$mol_assert_equal($$.$mol_func_name($$.$mol_func_name_test), '$mol_func_name_test');
|
|
928
|
+
$mol_assert_equal($$.$mol_func_name_test.name, '$mol_func_name_test');
|
|
929
|
+
},
|
|
930
|
+
});
|
|
931
|
+
})($ || ($ = {}));
|
|
932
|
+
//mol/func/name/name.test.ts
|
|
933
|
+
;
|
|
934
|
+
"use strict";
|
|
935
|
+
var $;
|
|
936
936
|
(function ($) {
|
|
937
937
|
$mol_test({
|
|
938
938
|
async 'take and drop db'() {
|