@ellipticltd/aml-utils 0.15.4 → 0.15.5

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.
Files changed (46) hide show
  1. package/.nyc_output/43e358d0-76a0-402c-b32e-26a347513bb4.json +1 -0
  2. package/.nyc_output/f8c694f5-2b17-4e37-9079-32079e715296.json +1 -0
  3. package/.nyc_output/processinfo/14c71e42-4ce7-487c-be9f-95228038c7ec.json +1 -0
  4. package/.nyc_output/processinfo/43e358d0-76a0-402c-b32e-26a347513bb4.json +1 -0
  5. package/.nyc_output/processinfo/470a2eff-bd46-45ef-bfd6-70c01fe4c9b3.json +1 -0
  6. package/.nyc_output/processinfo/f8c694f5-2b17-4e37-9079-32079e715296.json +1 -0
  7. package/.nyc_output/processinfo/index.json +1 -1
  8. package/coverage/errors/errors.js.html +1 -1
  9. package/coverage/errors/errors.spec.js.html +15 -15
  10. package/coverage/errors/index.html +12 -12
  11. package/coverage/file-parser/__tests/file-parser.spec.js.html +96 -96
  12. package/coverage/file-parser/__tests/index.html +32 -32
  13. package/coverage/file-parser/__tests/parse-row.spec.js.html +36 -36
  14. package/coverage/file-parser/__tests/sanitize-rows.spec.js.html +49 -49
  15. package/coverage/formatting/formatting.js.html +21 -21
  16. package/coverage/formatting/formatting.spec.js.html +30 -30
  17. package/coverage/formatting/index.html +28 -28
  18. package/coverage/index.html +54 -54
  19. package/coverage/middleware/index.html +1 -1
  20. package/coverage/middleware/middleware.js.html +1 -1
  21. package/coverage/orm-helpers/index.html +26 -26
  22. package/coverage/orm-helpers/ormHelpers.js.html +24 -24
  23. package/coverage/orm-helpers/ormHelpers.spec.js.html +9 -9
  24. package/coverage/types/index.html +1 -1
  25. package/coverage/types/types.js.html +1 -1
  26. package/coverage/validations/index.html +30 -30
  27. package/coverage/validations/validations.js.html +545 -236
  28. package/coverage/validations/validations.spec.js.html +525 -159
  29. package/dist/validations/validations.d.ts +6 -0
  30. package/dist/validations/validations.js +8 -0
  31. package/dist/validations/validations.spec.js +11 -0
  32. package/lib/validations/validations.js +8 -0
  33. package/lib/validations/validations.spec.js +16 -0
  34. package/package.json +1 -1
  35. package/.idea/aml-utils.iml +0 -12
  36. package/.idea/inspectionProfiles/Project_Default.xml +0 -6
  37. package/.idea/modules.xml +0 -8
  38. package/.idea/vcs.xml +0 -6
  39. package/.nyc_output/62fbf615-4746-451c-aa0c-c12cb22b7a9d.json +0 -1
  40. package/.nyc_output/fd0c5a49-1dee-497a-bd75-dcf009fcab1e.json +0 -1
  41. package/.nyc_output/processinfo/1aa97f38-9e09-4229-9e02-5f7fa02f213b.json +0 -1
  42. package/.nyc_output/processinfo/62fbf615-4746-451c-aa0c-c12cb22b7a9d.json +0 -1
  43. package/.nyc_output/processinfo/b5dcfb1d-3f6e-47a0-89e4-e93e7bcc51d7.json +0 -1
  44. package/.nyc_output/processinfo/fd0c5a49-1dee-497a-bd75-dcf009fcab1e.json +0 -1
  45. /package/.nyc_output/{1aa97f38-9e09-4229-9e02-5f7fa02f213b.json → 14c71e42-4ce7-487c-be9f-95228038c7ec.json} +0 -0
  46. /package/.nyc_output/{b5dcfb1d-3f6e-47a0-89e4-e93e7bcc51d7.json → 470a2eff-bd46-45ef-bfd6-70c01fe4c9b3.json} +0 -0
@@ -20,31 +20,31 @@
20
20
  </h1>
21
21
  <div class='clearfix'>
22
22
  <div class='fl pad1y space-right2'>
23
- <span class="strong">59.23% </span>
23
+ <span class="strong">99.23% </span>
24
24
  <span class="quiet">Statements</span>
25
- <span class='fraction'>170/287</span>
25
+ <span class='fraction'>385/388</span>
26
26
  </div>
27
27
  <div class='fl pad1y space-right2'>
28
- <span class="strong">0% </span>
28
+ <span class="strong">83.33% </span>
29
29
  <span class="quiet">Branches</span>
30
- <span class='fraction'>0/24</span>
30
+ <span class='fraction'>20/24</span>
31
31
  </div>
32
32
  <div class='fl pad1y space-right2'>
33
- <span class="strong">35.12% </span>
33
+ <span class="strong">98.69% </span>
34
34
  <span class="quiet">Functions</span>
35
- <span class='fraction'>59/168</span>
35
+ <span class='fraction'>226/229</span>
36
36
  </div>
37
37
  <div class='fl pad1y space-right2'>
38
- <span class="strong">87.63% </span>
38
+ <span class="strong">100% </span>
39
39
  <span class="quiet">Lines</span>
40
- <span class='fraction'>170/194</span>
40
+ <span class='fraction'>255/255</span>
41
41
  </div>
42
42
  </div>
43
43
  <p class="quiet">
44
44
  Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
45
45
  </p>
46
46
  </div>
47
- <div class='status-line medium'></div>
47
+ <div class='status-line high'></div>
48
48
  <pre><table class="coverage">
49
49
  <tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
50
50
  <a name='L2'></a><a href='#L2'>2</a>
@@ -413,7 +413,129 @@
413
413
  <a name='L365'></a><a href='#L365'>365</a>
414
414
  <a name='L366'></a><a href='#L366'>366</a>
415
415
  <a name='L367'></a><a href='#L367'>367</a>
416
- <a name='L368'></a><a href='#L368'>368</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">1x</span>
416
+ <a name='L368'></a><a href='#L368'>368</a>
417
+ <a name='L369'></a><a href='#L369'>369</a>
418
+ <a name='L370'></a><a href='#L370'>370</a>
419
+ <a name='L371'></a><a href='#L371'>371</a>
420
+ <a name='L372'></a><a href='#L372'>372</a>
421
+ <a name='L373'></a><a href='#L373'>373</a>
422
+ <a name='L374'></a><a href='#L374'>374</a>
423
+ <a name='L375'></a><a href='#L375'>375</a>
424
+ <a name='L376'></a><a href='#L376'>376</a>
425
+ <a name='L377'></a><a href='#L377'>377</a>
426
+ <a name='L378'></a><a href='#L378'>378</a>
427
+ <a name='L379'></a><a href='#L379'>379</a>
428
+ <a name='L380'></a><a href='#L380'>380</a>
429
+ <a name='L381'></a><a href='#L381'>381</a>
430
+ <a name='L382'></a><a href='#L382'>382</a>
431
+ <a name='L383'></a><a href='#L383'>383</a>
432
+ <a name='L384'></a><a href='#L384'>384</a>
433
+ <a name='L385'></a><a href='#L385'>385</a>
434
+ <a name='L386'></a><a href='#L386'>386</a>
435
+ <a name='L387'></a><a href='#L387'>387</a>
436
+ <a name='L388'></a><a href='#L388'>388</a>
437
+ <a name='L389'></a><a href='#L389'>389</a>
438
+ <a name='L390'></a><a href='#L390'>390</a>
439
+ <a name='L391'></a><a href='#L391'>391</a>
440
+ <a name='L392'></a><a href='#L392'>392</a>
441
+ <a name='L393'></a><a href='#L393'>393</a>
442
+ <a name='L394'></a><a href='#L394'>394</a>
443
+ <a name='L395'></a><a href='#L395'>395</a>
444
+ <a name='L396'></a><a href='#L396'>396</a>
445
+ <a name='L397'></a><a href='#L397'>397</a>
446
+ <a name='L398'></a><a href='#L398'>398</a>
447
+ <a name='L399'></a><a href='#L399'>399</a>
448
+ <a name='L400'></a><a href='#L400'>400</a>
449
+ <a name='L401'></a><a href='#L401'>401</a>
450
+ <a name='L402'></a><a href='#L402'>402</a>
451
+ <a name='L403'></a><a href='#L403'>403</a>
452
+ <a name='L404'></a><a href='#L404'>404</a>
453
+ <a name='L405'></a><a href='#L405'>405</a>
454
+ <a name='L406'></a><a href='#L406'>406</a>
455
+ <a name='L407'></a><a href='#L407'>407</a>
456
+ <a name='L408'></a><a href='#L408'>408</a>
457
+ <a name='L409'></a><a href='#L409'>409</a>
458
+ <a name='L410'></a><a href='#L410'>410</a>
459
+ <a name='L411'></a><a href='#L411'>411</a>
460
+ <a name='L412'></a><a href='#L412'>412</a>
461
+ <a name='L413'></a><a href='#L413'>413</a>
462
+ <a name='L414'></a><a href='#L414'>414</a>
463
+ <a name='L415'></a><a href='#L415'>415</a>
464
+ <a name='L416'></a><a href='#L416'>416</a>
465
+ <a name='L417'></a><a href='#L417'>417</a>
466
+ <a name='L418'></a><a href='#L418'>418</a>
467
+ <a name='L419'></a><a href='#L419'>419</a>
468
+ <a name='L420'></a><a href='#L420'>420</a>
469
+ <a name='L421'></a><a href='#L421'>421</a>
470
+ <a name='L422'></a><a href='#L422'>422</a>
471
+ <a name='L423'></a><a href='#L423'>423</a>
472
+ <a name='L424'></a><a href='#L424'>424</a>
473
+ <a name='L425'></a><a href='#L425'>425</a>
474
+ <a name='L426'></a><a href='#L426'>426</a>
475
+ <a name='L427'></a><a href='#L427'>427</a>
476
+ <a name='L428'></a><a href='#L428'>428</a>
477
+ <a name='L429'></a><a href='#L429'>429</a>
478
+ <a name='L430'></a><a href='#L430'>430</a>
479
+ <a name='L431'></a><a href='#L431'>431</a>
480
+ <a name='L432'></a><a href='#L432'>432</a>
481
+ <a name='L433'></a><a href='#L433'>433</a>
482
+ <a name='L434'></a><a href='#L434'>434</a>
483
+ <a name='L435'></a><a href='#L435'>435</a>
484
+ <a name='L436'></a><a href='#L436'>436</a>
485
+ <a name='L437'></a><a href='#L437'>437</a>
486
+ <a name='L438'></a><a href='#L438'>438</a>
487
+ <a name='L439'></a><a href='#L439'>439</a>
488
+ <a name='L440'></a><a href='#L440'>440</a>
489
+ <a name='L441'></a><a href='#L441'>441</a>
490
+ <a name='L442'></a><a href='#L442'>442</a>
491
+ <a name='L443'></a><a href='#L443'>443</a>
492
+ <a name='L444'></a><a href='#L444'>444</a>
493
+ <a name='L445'></a><a href='#L445'>445</a>
494
+ <a name='L446'></a><a href='#L446'>446</a>
495
+ <a name='L447'></a><a href='#L447'>447</a>
496
+ <a name='L448'></a><a href='#L448'>448</a>
497
+ <a name='L449'></a><a href='#L449'>449</a>
498
+ <a name='L450'></a><a href='#L450'>450</a>
499
+ <a name='L451'></a><a href='#L451'>451</a>
500
+ <a name='L452'></a><a href='#L452'>452</a>
501
+ <a name='L453'></a><a href='#L453'>453</a>
502
+ <a name='L454'></a><a href='#L454'>454</a>
503
+ <a name='L455'></a><a href='#L455'>455</a>
504
+ <a name='L456'></a><a href='#L456'>456</a>
505
+ <a name='L457'></a><a href='#L457'>457</a>
506
+ <a name='L458'></a><a href='#L458'>458</a>
507
+ <a name='L459'></a><a href='#L459'>459</a>
508
+ <a name='L460'></a><a href='#L460'>460</a>
509
+ <a name='L461'></a><a href='#L461'>461</a>
510
+ <a name='L462'></a><a href='#L462'>462</a>
511
+ <a name='L463'></a><a href='#L463'>463</a>
512
+ <a name='L464'></a><a href='#L464'>464</a>
513
+ <a name='L465'></a><a href='#L465'>465</a>
514
+ <a name='L466'></a><a href='#L466'>466</a>
515
+ <a name='L467'></a><a href='#L467'>467</a>
516
+ <a name='L468'></a><a href='#L468'>468</a>
517
+ <a name='L469'></a><a href='#L469'>469</a>
518
+ <a name='L470'></a><a href='#L470'>470</a>
519
+ <a name='L471'></a><a href='#L471'>471</a>
520
+ <a name='L472'></a><a href='#L472'>472</a>
521
+ <a name='L473'></a><a href='#L473'>473</a>
522
+ <a name='L474'></a><a href='#L474'>474</a>
523
+ <a name='L475'></a><a href='#L475'>475</a>
524
+ <a name='L476'></a><a href='#L476'>476</a>
525
+ <a name='L477'></a><a href='#L477'>477</a>
526
+ <a name='L478'></a><a href='#L478'>478</a>
527
+ <a name='L479'></a><a href='#L479'>479</a>
528
+ <a name='L480'></a><a href='#L480'>480</a>
529
+ <a name='L481'></a><a href='#L481'>481</a>
530
+ <a name='L482'></a><a href='#L482'>482</a>
531
+ <a name='L483'></a><a href='#L483'>483</a>
532
+ <a name='L484'></a><a href='#L484'>484</a>
533
+ <a name='L485'></a><a href='#L485'>485</a>
534
+ <a name='L486'></a><a href='#L486'>486</a>
535
+ <a name='L487'></a><a href='#L487'>487</a>
536
+ <a name='L488'></a><a href='#L488'>488</a>
537
+ <a name='L489'></a><a href='#L489'>489</a>
538
+ <a name='L490'></a><a href='#L490'>490</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">1x</span>
417
539
  <span class="cline-any cline-neutral">&nbsp;</span>
418
540
  <span class="cline-any cline-yes">1x</span>
419
541
  <span class="cline-any cline-neutral">&nbsp;</span>
@@ -451,12 +573,12 @@
451
573
  <span class="cline-any cline-neutral">&nbsp;</span>
452
574
  <span class="cline-any cline-neutral">&nbsp;</span>
453
575
  <span class="cline-any cline-yes">1x</span>
454
- <span class="cline-any cline-no">&nbsp;</span>
576
+ <span class="cline-any cline-yes">1x</span>
455
577
  <span class="cline-any cline-neutral">&nbsp;</span>
456
578
  <span class="cline-any cline-neutral">&nbsp;</span>
457
579
  <span class="cline-any cline-yes">1x</span>
458
- <span class="cline-any cline-no">&nbsp;</span>
459
- <span class="cline-any cline-no">&nbsp;</span>
580
+ <span class="cline-any cline-yes">1x</span>
581
+ <span class="cline-any cline-yes">1x</span>
460
582
  <span class="cline-any cline-neutral">&nbsp;</span>
461
583
  <span class="cline-any cline-neutral">&nbsp;</span>
462
584
  <span class="cline-any cline-neutral">&nbsp;</span>
@@ -465,8 +587,8 @@
465
587
  <span class="cline-any cline-neutral">&nbsp;</span>
466
588
  <span class="cline-any cline-neutral">&nbsp;</span>
467
589
  <span class="cline-any cline-yes">1x</span>
468
- <span class="cline-any cline-no">&nbsp;</span>
469
- <span class="cline-any cline-no">&nbsp;</span>
590
+ <span class="cline-any cline-yes">1x</span>
591
+ <span class="cline-any cline-yes">1x</span>
470
592
  <span class="cline-any cline-neutral">&nbsp;</span>
471
593
  <span class="cline-any cline-neutral">&nbsp;</span>
472
594
  <span class="cline-any cline-yes">1x</span>
@@ -488,26 +610,26 @@
488
610
  <span class="cline-any cline-yes">1x</span>
489
611
  <span class="cline-any cline-neutral">&nbsp;</span>
490
612
  <span class="cline-any cline-yes">1x</span>
491
- <span class="cline-any cline-no">&nbsp;</span>
613
+ <span class="cline-any cline-yes">1x</span>
492
614
  <span class="cline-any cline-neutral">&nbsp;</span>
493
615
  <span class="cline-any cline-neutral">&nbsp;</span>
494
616
  <span class="cline-any cline-neutral">&nbsp;</span>
495
617
  <span class="cline-any cline-yes">1x</span>
496
618
  <span class="cline-any cline-yes">1x</span>
497
- <span class="cline-any cline-no">&nbsp;</span>
619
+ <span class="cline-any cline-yes">1x</span>
498
620
  <span class="cline-any cline-neutral">&nbsp;</span>
499
621
  <span class="cline-any cline-yes">1x</span>
500
- <span class="cline-any cline-no">&nbsp;</span>
622
+ <span class="cline-any cline-yes">1x</span>
501
623
  <span class="cline-any cline-neutral">&nbsp;</span>
502
624
  <span class="cline-any cline-neutral">&nbsp;</span>
503
625
  <span class="cline-any cline-neutral">&nbsp;</span>
504
626
  <span class="cline-any cline-yes">1x</span>
505
627
  <span class="cline-any cline-yes">1x</span>
506
- <span class="cline-any cline-no">&nbsp;</span>
628
+ <span class="cline-any cline-yes">1x</span>
507
629
  <span class="cline-any cline-neutral">&nbsp;</span>
508
630
  <span class="cline-any cline-neutral">&nbsp;</span>
509
631
  <span class="cline-any cline-yes">1x</span>
510
- <span class="cline-any cline-no">&nbsp;</span>
632
+ <span class="cline-any cline-yes">1x</span>
511
633
  <span class="cline-any cline-neutral">&nbsp;</span>
512
634
  <span class="cline-any cline-neutral">&nbsp;</span>
513
635
  <span class="cline-any cline-neutral">&nbsp;</span>
@@ -515,11 +637,11 @@
515
637
  <span class="cline-any cline-yes">1x</span>
516
638
  <span class="cline-any cline-neutral">&nbsp;</span>
517
639
  <span class="cline-any cline-yes">1x</span>
518
- <span class="cline-any cline-no">&nbsp;</span>
640
+ <span class="cline-any cline-yes">1x</span>
519
641
  <span class="cline-any cline-neutral">&nbsp;</span>
520
642
  <span class="cline-any cline-neutral">&nbsp;</span>
521
643
  <span class="cline-any cline-yes">1x</span>
522
- <span class="cline-any cline-no">&nbsp;</span>
644
+ <span class="cline-any cline-yes">1x</span>
523
645
  <span class="cline-any cline-neutral">&nbsp;</span>
524
646
  <span class="cline-any cline-neutral">&nbsp;</span>
525
647
  <span class="cline-any cline-neutral">&nbsp;</span>
@@ -527,37 +649,37 @@
527
649
  <span class="cline-any cline-yes">1x</span>
528
650
  <span class="cline-any cline-neutral">&nbsp;</span>
529
651
  <span class="cline-any cline-yes">1x</span>
530
- <span class="cline-any cline-no">&nbsp;</span>
652
+ <span class="cline-any cline-yes">1x</span>
531
653
  <span class="cline-any cline-neutral">&nbsp;</span>
532
654
  <span class="cline-any cline-neutral">&nbsp;</span>
533
655
  <span class="cline-any cline-yes">1x</span>
534
- <span class="cline-any cline-no">&nbsp;</span>
656
+ <span class="cline-any cline-yes">1x</span>
535
657
  <span class="cline-any cline-neutral">&nbsp;</span>
536
658
  <span class="cline-any cline-neutral">&nbsp;</span>
537
659
  <span class="cline-any cline-neutral">&nbsp;</span>
538
660
  <span class="cline-any cline-yes">1x</span>
539
661
  <span class="cline-any cline-yes">1x</span>
540
- <span class="cline-any cline-no">&nbsp;</span>
541
- <span class="cline-any cline-no">&nbsp;</span>
662
+ <span class="cline-any cline-yes">1x</span>
663
+ <span class="cline-any cline-yes">1x</span>
542
664
  <span class="cline-any cline-neutral">&nbsp;</span>
543
665
  <span class="cline-any cline-neutral">&nbsp;</span>
544
666
  <span class="cline-any cline-yes">1x</span>
545
- <span class="cline-any cline-no">&nbsp;</span>
546
- <span class="cline-any cline-no">&nbsp;</span>
547
- <span class="cline-any cline-no">&nbsp;</span>
667
+ <span class="cline-any cline-yes">1x</span>
668
+ <span class="cline-any cline-yes">1x</span>
669
+ <span class="cline-any cline-yes">1x</span>
548
670
  <span class="cline-any cline-neutral">&nbsp;</span>
549
671
  <span class="cline-any cline-neutral">&nbsp;</span>
550
672
  <span class="cline-any cline-neutral">&nbsp;</span>
551
673
  <span class="cline-any cline-yes">1x</span>
552
674
  <span class="cline-any cline-yes">1x</span>
553
- <span class="cline-any cline-no">&nbsp;</span>
554
- <span class="cline-any cline-no">&nbsp;</span>
675
+ <span class="cline-any cline-yes">1x</span>
676
+ <span class="cline-any cline-yes">1x</span>
555
677
  <span class="cline-any cline-neutral">&nbsp;</span>
556
678
  <span class="cline-any cline-neutral">&nbsp;</span>
557
679
  <span class="cline-any cline-yes">1x</span>
558
- <span class="cline-any cline-no">&nbsp;</span>
559
- <span class="cline-any cline-no">&nbsp;</span>
560
- <span class="cline-any cline-no">&nbsp;</span>
680
+ <span class="cline-any cline-yes">1x</span>
681
+ <span class="cline-any cline-yes">1x</span>
682
+ <span class="cline-any cline-yes">1x</span>
561
683
  <span class="cline-any cline-neutral">&nbsp;</span>
562
684
  <span class="cline-any cline-neutral">&nbsp;</span>
563
685
  <span class="cline-any cline-neutral">&nbsp;</span>
@@ -690,6 +812,24 @@
690
812
  <span class="cline-any cline-neutral">&nbsp;</span>
691
813
  <span class="cline-any cline-yes">1x</span>
692
814
  <span class="cline-any cline-neutral">&nbsp;</span>
815
+ <span class="cline-any cline-yes">1x</span>
816
+ <span class="cline-any cline-neutral">&nbsp;</span>
817
+ <span class="cline-any cline-neutral">&nbsp;</span>
818
+ <span class="cline-any cline-yes">1x</span>
819
+ <span class="cline-any cline-yes">1x</span>
820
+ <span class="cline-any cline-neutral">&nbsp;</span>
821
+ <span class="cline-any cline-yes">1x</span>
822
+ <span class="cline-any cline-neutral">&nbsp;</span>
823
+ <span class="cline-any cline-yes">1x</span>
824
+ <span class="cline-any cline-neutral">&nbsp;</span>
825
+ <span class="cline-any cline-neutral">&nbsp;</span>
826
+ <span class="cline-any cline-neutral">&nbsp;</span>
827
+ <span class="cline-any cline-yes">1x</span>
828
+ <span class="cline-any cline-yes">1x</span>
829
+ <span class="cline-any cline-yes">1x</span>
830
+ <span class="cline-any cline-neutral">&nbsp;</span>
831
+ <span class="cline-any cline-yes">1x</span>
832
+ <span class="cline-any cline-neutral">&nbsp;</span>
693
833
  <span class="cline-any cline-neutral">&nbsp;</span>
694
834
  <span class="cline-any cline-yes">1x</span>
695
835
  <span class="cline-any cline-yes">1x</span>
@@ -780,6 +920,110 @@
780
920
  <span class="cline-any cline-neutral">&nbsp;</span>
781
921
  <span class="cline-any cline-neutral">&nbsp;</span>
782
922
  <span class="cline-any cline-neutral">&nbsp;</span>
923
+ <span class="cline-any cline-yes">1x</span>
924
+ <span class="cline-any cline-yes">1x</span>
925
+ <span class="cline-any cline-yes">1x</span>
926
+ <span class="cline-any cline-neutral">&nbsp;</span>
927
+ <span class="cline-any cline-yes">1x</span>
928
+ <span class="cline-any cline-neutral">&nbsp;</span>
929
+ <span class="cline-any cline-neutral">&nbsp;</span>
930
+ <span class="cline-any cline-yes">1x</span>
931
+ <span class="cline-any cline-yes">1x</span>
932
+ <span class="cline-any cline-neutral">&nbsp;</span>
933
+ <span class="cline-any cline-yes">1x</span>
934
+ <span class="cline-any cline-neutral">&nbsp;</span>
935
+ <span class="cline-any cline-yes">1x</span>
936
+ <span class="cline-any cline-neutral">&nbsp;</span>
937
+ <span class="cline-any cline-neutral">&nbsp;</span>
938
+ <span class="cline-any cline-neutral">&nbsp;</span>
939
+ <span class="cline-any cline-yes">1x</span>
940
+ <span class="cline-any cline-yes">1x</span>
941
+ <span class="cline-any cline-yes">1x</span>
942
+ <span class="cline-any cline-neutral">&nbsp;</span>
943
+ <span class="cline-any cline-yes">1x</span>
944
+ <span class="cline-any cline-neutral">&nbsp;</span>
945
+ <span class="cline-any cline-yes">1x</span>
946
+ <span class="cline-any cline-neutral">&nbsp;</span>
947
+ <span class="cline-any cline-neutral">&nbsp;</span>
948
+ <span class="cline-any cline-yes">1x</span>
949
+ <span class="cline-any cline-yes">1x</span>
950
+ <span class="cline-any cline-neutral">&nbsp;</span>
951
+ <span class="cline-any cline-yes">1x</span>
952
+ <span class="cline-any cline-neutral">&nbsp;</span>
953
+ <span class="cline-any cline-yes">1x</span>
954
+ <span class="cline-any cline-neutral">&nbsp;</span>
955
+ <span class="cline-any cline-neutral">&nbsp;</span>
956
+ <span class="cline-any cline-neutral">&nbsp;</span>
957
+ <span class="cline-any cline-yes">1x</span>
958
+ <span class="cline-any cline-yes">1x</span>
959
+ <span class="cline-any cline-yes">1x</span>
960
+ <span class="cline-any cline-neutral">&nbsp;</span>
961
+ <span class="cline-any cline-yes">1x</span>
962
+ <span class="cline-any cline-neutral">&nbsp;</span>
963
+ <span class="cline-any cline-yes">1x</span>
964
+ <span class="cline-any cline-neutral">&nbsp;</span>
965
+ <span class="cline-any cline-neutral">&nbsp;</span>
966
+ <span class="cline-any cline-yes">1x</span>
967
+ <span class="cline-any cline-yes">1x</span>
968
+ <span class="cline-any cline-neutral">&nbsp;</span>
969
+ <span class="cline-any cline-yes">1x</span>
970
+ <span class="cline-any cline-neutral">&nbsp;</span>
971
+ <span class="cline-any cline-neutral">&nbsp;</span>
972
+ <span class="cline-any cline-neutral">&nbsp;</span>
973
+ <span class="cline-any cline-yes">1x</span>
974
+ <span class="cline-any cline-yes">1x</span>
975
+ <span class="cline-any cline-yes">1x</span>
976
+ <span class="cline-any cline-neutral">&nbsp;</span>
977
+ <span class="cline-any cline-yes">1x</span>
978
+ <span class="cline-any cline-neutral">&nbsp;</span>
979
+ <span class="cline-any cline-yes">1x</span>
980
+ <span class="cline-any cline-neutral">&nbsp;</span>
981
+ <span class="cline-any cline-neutral">&nbsp;</span>
982
+ <span class="cline-any cline-yes">1x</span>
983
+ <span class="cline-any cline-yes">1x</span>
984
+ <span class="cline-any cline-neutral">&nbsp;</span>
985
+ <span class="cline-any cline-yes">1x</span>
986
+ <span class="cline-any cline-neutral">&nbsp;</span>
987
+ <span class="cline-any cline-neutral">&nbsp;</span>
988
+ <span class="cline-any cline-neutral">&nbsp;</span>
989
+ <span class="cline-any cline-yes">1x</span>
990
+ <span class="cline-any cline-yes">1x</span>
991
+ <span class="cline-any cline-yes">1x</span>
992
+ <span class="cline-any cline-neutral">&nbsp;</span>
993
+ <span class="cline-any cline-yes">1x</span>
994
+ <span class="cline-any cline-neutral">&nbsp;</span>
995
+ <span class="cline-any cline-yes">1x</span>
996
+ <span class="cline-any cline-neutral">&nbsp;</span>
997
+ <span class="cline-any cline-neutral">&nbsp;</span>
998
+ <span class="cline-any cline-yes">1x</span>
999
+ <span class="cline-any cline-yes">1x</span>
1000
+ <span class="cline-any cline-neutral">&nbsp;</span>
1001
+ <span class="cline-any cline-yes">1x</span>
1002
+ <span class="cline-any cline-neutral">&nbsp;</span>
1003
+ <span class="cline-any cline-neutral">&nbsp;</span>
1004
+ <span class="cline-any cline-neutral">&nbsp;</span>
1005
+ <span class="cline-any cline-yes">1x</span>
1006
+ <span class="cline-any cline-yes">1x</span>
1007
+ <span class="cline-any cline-yes">1x</span>
1008
+ <span class="cline-any cline-neutral">&nbsp;</span>
1009
+ <span class="cline-any cline-yes">1x</span>
1010
+ <span class="cline-any cline-neutral">&nbsp;</span>
1011
+ <span class="cline-any cline-yes">1x</span>
1012
+ <span class="cline-any cline-neutral">&nbsp;</span>
1013
+ <span class="cline-any cline-yes">1x</span>
1014
+ <span class="cline-any cline-neutral">&nbsp;</span>
1015
+ <span class="cline-any cline-yes">1x</span>
1016
+ <span class="cline-any cline-neutral">&nbsp;</span>
1017
+ <span class="cline-any cline-neutral">&nbsp;</span>
1018
+ <span class="cline-any cline-yes">1x</span>
1019
+ <span class="cline-any cline-yes">1x</span>
1020
+ <span class="cline-any cline-neutral">&nbsp;</span>
1021
+ <span class="cline-any cline-yes">1x</span>
1022
+ <span class="cline-any cline-neutral">&nbsp;</span>
1023
+ <span class="cline-any cline-yes">1x</span>
1024
+ <span class="cline-any cline-neutral">&nbsp;</span>
1025
+ <span class="cline-any cline-neutral">&nbsp;</span>
1026
+ <span class="cline-any cline-neutral">&nbsp;</span>
783
1027
  <span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">import validations from './validations';
784
1028
  &nbsp;
785
1029
  const chai = require('chai');
@@ -789,54 +1033,54 @@ const { expect, assert } = chai;
789
1033
  describe('Validations', () =&gt; {
790
1034
  describe('global checks', () =&gt; {
791
1035
  describe('exists', () =&gt; {
792
- it('should return true when passed any value', <span class="fstat-no" title="function not covered" >() =</span>&gt; <span class="cstat-no" title="statement not covered" >validations.exists('x').should.be.true)</span>;
1036
+ it('should return true when passed any value', () =&gt; validations.exists('x').should.be.true);
793
1037
  &nbsp;
794
- it('should return false when not passed a value', <span class="fstat-no" title="function not covered" >() =</span>&gt; <span class="cstat-no" title="statement not covered" >validations.exists().should.be.false)</span>;
1038
+ it('should return false when not passed a value', () =&gt; validations.exists().should.be.false);
795
1039
  });
796
1040
  &nbsp;
797
1041
  describe('nonEmpty', () =&gt; {
798
- it('should return true when passed any value with a length', <span class="fstat-no" title="function not covered" >() =</span>&gt; <span class="cstat-no" title="statement not covered" >validations.nonEmpty('x').should.be.true</span>
1042
+ it('should return true when passed any value with a length', () =&gt; validations.nonEmpty('x').should.be.true
799
1043
  &amp;&amp; validations.nonEmpty(['x']));
800
1044
  &nbsp;
801
- it('should return false when passed a value without a length', <span class="fstat-no" title="function not covered" >() =</span>&gt; <span class="cstat-no" title="statement not covered" >validations.nonEmpty().should.be.false</span>
1045
+ it('should return false when passed a value without a length', () =&gt; validations.nonEmpty().should.be.false
802
1046
  &amp;&amp; validations.nonEmpty({}).should.be.false
803
1047
  &amp;&amp; validations.nonEmpty(null).should.be.false
804
1048
  &amp;&amp; validations.nonEmpty(undefined).should.be.false);
805
1049
  });
806
1050
  &nbsp;
807
1051
  describe('isNonEmptyString', () =&gt; {
808
- it('should return true when passed a string of any length', <span class="fstat-no" title="function not covered" >() =</span>&gt; <span class="cstat-no" title="statement not covered" >validations.isNonEmptyString('x').should.be.true</span>
1052
+ it('should return true when passed a string of any length', () =&gt; validations.isNonEmptyString('x').should.be.true
809
1053
  &amp;&amp; validations.isNonEmptyString('Do not go gentle into that good night, Old age should burn and rage at close of day; Rage, rage against the dying of the light.').should.be.true);
810
1054
  &nbsp;
811
- it('should return false when passed an empty string or something that is not a string', <span class="fstat-no" title="function not covered" >() =</span>&gt; <span class="cstat-no" title="statement not covered" >validations.isNonEmptyString('').should.be.false</span>
1055
+ it('should return false when passed an empty string or something that is not a string', () =&gt; validations.isNonEmptyString('').should.be.false
812
1056
  &amp;&amp; validations.isNonEmptyString(['x']).should.be.false
813
1057
  &amp;&amp; validations.isNonEmptyString({ key: 'val' }).should.be.false);
814
1058
  });
815
1059
  &nbsp;
816
1060
  describe('ensureShortEnough', () =&gt; {
817
- it('should return true when the given string is shorter in length than the given length', <span class="fstat-no" title="function not covered" >() =</span>&gt; <span class="cstat-no" title="statement not covered" >validations.ensureShortEnough(3, 'foo').should.be.true</span>
1061
+ it('should return true when the given string is shorter in length than the given length', () =&gt; validations.ensureShortEnough(3, 'foo').should.be.true
818
1062
  &amp;&amp; validations.ensureShortEnough(3, 'fo').should.be.true);
819
1063
  &nbsp;
820
- it('should throw a BadRequest error if the given string is longer than the given length', <span class="fstat-no" title="function not covered" >() =</span>&gt; {
821
- <span class="cstat-no" title="statement not covered" > expect(<span class="fstat-no" title="function not covered" >() =</span>&gt; <span class="cstat-no" title="statement not covered" >validations.ensureShortEnough(3, 'foo!'))</span>.to.throw('Max query size exceeded: 4 / 3');</span>
1064
+ it('should throw a BadRequest error if the given string is longer than the given length', () =&gt; {
1065
+ expect(() =&gt; validations.ensureShortEnough(3, 'foo!')).to.throw('Max query size exceeded: 4 / 3');
822
1066
  });
823
1067
  &nbsp;
824
- it('should throw a BadRequest error if the given string is null or undefined', <span class="fstat-no" title="function not covered" >() =</span>&gt; {
825
- <span class="cstat-no" title="statement not covered" > expect(<span class="fstat-no" title="function not covered" >() =</span>&gt; <span class="cstat-no" title="statement not covered" >validations.ensureShortEnough(3, null))</span>.to.throw('Max query size exceeded: undefined / 3');</span>
826
- <span class="cstat-no" title="statement not covered" > expect(<span class="fstat-no" title="function not covered" >() =</span>&gt; <span class="cstat-no" title="statement not covered" >validations.ensureShortEnough(3, undefined))</span>.to.throw('Max query size exceeded: undefined / 3');</span>
1068
+ it('should throw a BadRequest error if the given string is null or undefined', () =&gt; {
1069
+ expect(() =&gt; validations.ensureShortEnough(3, null)).to.throw('Max query size exceeded: undefined / 3');
1070
+ expect(() =&gt; validations.ensureShortEnough(3, undefined)).to.throw('Max query size exceeded: undefined / 3');
827
1071
  });
828
1072
  });
829
1073
  &nbsp;
830
1074
  describe('ensure', () =&gt; {
831
- it('should return true if the first argument is not null or undefined', <span class="fstat-no" title="function not covered" >() =</span>&gt; <span class="cstat-no" title="statement not covered" >validations.ensure('thing', 'Error message').should.be.true</span>
1075
+ it('should return true if the first argument is not null or undefined', () =&gt; validations.ensure('thing', 'Error message').should.be.true
832
1076
  &amp;&amp; validations.ensure(['array'], 'Error message').should.be.true
833
1077
  &amp;&amp; validations.ensure({ key: 'val' }).should.be.true);
834
- it('should throw a BadRequest error if the first argument is null or undefined', <span class="fstat-no" title="function not covered" >() =</span>&gt; {
835
- <span class="cstat-no" title="statement not covered" > expect(<span class="fstat-no" title="function not covered" >() =</span>&gt; <span class="cstat-no" title="statement not covered" >validations.ensure(null, 'Error message').to.throw('Error message'))</span>;</span>
836
- <span class="cstat-no" title="statement not covered" > expect(<span class="fstat-no" title="function not covered" >() =</span>&gt; <span class="cstat-no" title="statement not covered" >validations.ensure(undefined, 'Error message').to.throw('Error message'))</span>;</span>
1078
+ it('should throw a BadRequest error if the first argument is null or undefined', () =&gt; {
1079
+ expect(<span class="fstat-no" title="function not covered" >() =</span>&gt; <span class="cstat-no" title="statement not covered" >validations.ensure(null, 'Error message').to.throw('Error message'))</span>;
1080
+ expect(<span class="fstat-no" title="function not covered" >() =</span>&gt; <span class="cstat-no" title="statement not covered" >validations.ensure(undefined, 'Error message').to.throw('Error message'))</span>;
837
1081
  });
838
1082
  });
839
- describe.only('isSafeString', () =&gt; {
1083
+ describe('isSafeString', () =&gt; {
840
1084
  it('should return true if the first argument is a safe string', () =&gt; {
841
1085
  validations.isSafeString('aaaaa').should.be.true;
842
1086
  validations.isSafeString('Customer reference').should.be.true;
@@ -852,298 +1096,420 @@ describe('Validations', () =&gt; {
852
1096
  &nbsp;
853
1097
  describe('check', () =&gt; {
854
1098
  describe('matches', () =&gt; {
855
- it('should return true when passed two arrays that exactly match', <span class="fstat-no" title="function not covered" >() =</span>&gt; <span class="cstat-no" title="statement not covered" >validations.check.matches([1, 2, 3, 4, 5], [1, 2, 3, 4, 5], 'error message').should.be.true)</span>;
1099
+ it('should return true when passed two arrays that exactly match', () =&gt; validations.check.matches([1, 2, 3, 4, 5], [1, 2, 3, 4, 5], 'error message').should.be.true);
856
1100
  &nbsp;
857
- it('should throw an error when passed two arrays that do not exactly match', <span class="fstat-no" title="function not covered" >() =</span>&gt; {
858
- <span class="cstat-no" title="statement not covered" > expect(<span class="fstat-no" title="function not covered" >() =</span>&gt; <span class="cstat-no" title="statement not covered" >validations.check.matches([1, 2, 3, 4], [1, 2, 3, 4, 5], 'Error message').to.throw('Error message'))</span>;</span>
1101
+ it('should throw an error when passed two arrays that do not exactly match', () =&gt; {
1102
+ expect(<span class="fstat-no" title="function not covered" >() =</span>&gt; <span class="cstat-no" title="statement not covered" >validations.check.matches([1, 2, 3, 4], [1, 2, 3, 4, 5], 'Error message').to.throw('Error message'))</span>;
859
1103
  });
860
1104
  });
861
1105
  &nbsp;
862
1106
  describe('wasFound', () =&gt; {
863
- it('should return the string passed if this is not null', <span class="fstat-no" title="function not covered" >() =</span>&gt; {
864
- <span class="cstat-no" title="statement not covered" > expect(validations.check.wasFound()('string')).to.equal('string');</span>
1107
+ it('should return the string passed if this is not null', () =&gt; {
1108
+ expect(validations.check.wasFound()('string')).to.equal('string');
865
1109
  });
866
- it('should throw an error if the item is null', <span class="fstat-no" title="function not covered" >() =</span>&gt; {
867
- <span class="cstat-no" title="statement not covered" > expect(<span class="fstat-no" title="function not covered" >() =</span>&gt; <span class="cstat-no" title="statement not covered" >validations.check.wasFound('no value')())</span>.to.throw('Unknown no value');</span>
1110
+ it('should throw an error if the item is null', () =&gt; {
1111
+ expect(() =&gt; validations.check.wasFound('no value')()).to.throw('Unknown no value');
868
1112
  });
869
1113
  });
870
1114
  &nbsp;
871
1115
  describe('wasCreated', () =&gt; {
872
- it('should return the array passed if it is not empty', <span class="fstat-no" title="function not covered" >() =</span>&gt; {
873
- <span class="cstat-no" title="statement not covered" > expect(validations.check.wasCreated()([1, 2, 3])).to.eql([1, 2, 3]);</span>
1116
+ it('should return the array passed if it is not empty', () =&gt; {
1117
+ expect(validations.check.wasCreated()([1, 2, 3])).to.eql([1, 2, 3]);
874
1118
  });
875
1119
  &nbsp;
876
- it('should throw an error if the array is empty', <span class="fstat-no" title="function not covered" >() =</span>&gt; {
877
- <span class="cstat-no" title="statement not covered" > expect(<span class="fstat-no" title="function not covered" >() =</span>&gt; <span class="cstat-no" title="statement not covered" >validations.check.wasCreated('Oh no! No array!')([]))</span>.to.throw('Oh no! No array!');</span>
1120
+ it('should throw an error if the array is empty', () =&gt; {
1121
+ expect(() =&gt; validations.check.wasCreated('Oh no! No array!')([])).to.throw('Oh no! No array!');
878
1122
  });
879
1123
  });
880
1124
  &nbsp;
881
1125
  describe('isTrue', () =&gt; {
882
1126
  const count = 2;
883
1127
  &nbsp;
884
- it('should return true when the first arg is truthy', <span class="fstat-no" title="function not covered" >() =</span>&gt; {
885
- <span class="cstat-no" title="statement not covered" > assert(validations.check.isTrue(count === 2, 'Count equals 2'), 'isTrue should be false');</span>
1128
+ it('should return true when the first arg is truthy', () =&gt; {
1129
+ assert(validations.check.isTrue(count === 2, 'Count equals 2'), 'isTrue should be false');
886
1130
  });
887
1131
  &nbsp;
888
- it('should throw an error when the first arg is falsy', <span class="fstat-no" title="function not covered" >() =</span>&gt; {
889
- <span class="cstat-no" title="statement not covered" > expect(<span class="fstat-no" title="function not covered" >() =</span>&gt; <span class="cstat-no" title="statement not covered" >validations.check.isTrue(count &lt;= 1, 'Count is greater than 1'))</span>.to.throw('Count is greater than 1');</span>
1132
+ it('should throw an error when the first arg is falsy', () =&gt; {
1133
+ expect(() =&gt; validations.check.isTrue(count &lt;= 1, 'Count is greater than 1')).to.throw('Count is greater than 1');
890
1134
  });
891
1135
  });
892
1136
  &nbsp;
893
1137
  describe('isFalse', () =&gt; {
894
1138
  const count = 2;
895
1139
  &nbsp;
896
- it('should return true when the first arg is falsy', <span class="fstat-no" title="function not covered" >() =</span>&gt; {
897
- <span class="cstat-no" title="statement not covered" > assert(validations.check.isFalse(count === 3, 'Count should not equal 3'), 'isFalse should be true');</span>
1140
+ it('should return true when the first arg is falsy', () =&gt; {
1141
+ assert(validations.check.isFalse(count === 3, 'Count should not equal 3'), 'isFalse should be true');
898
1142
  });
899
1143
  &nbsp;
900
- it('should throw an error when the first arg is truthy', <span class="fstat-no" title="function not covered" >() =</span>&gt; {
901
- <span class="cstat-no" title="statement not covered" > expect(<span class="fstat-no" title="function not covered" >() =</span>&gt; <span class="cstat-no" title="statement not covered" >validations.check.isFalse(count &gt; 1, 'Count should be greater than 1'))</span>.to.throw('Count should be greater than 1');</span>
1144
+ it('should throw an error when the first arg is truthy', () =&gt; {
1145
+ expect(() =&gt; validations.check.isFalse(count &gt; 1, 'Count should be greater than 1')).to.throw('Count should be greater than 1');
902
1146
  });
903
1147
  });
904
1148
  &nbsp;
905
1149
  describe('isCustomerReference', () =&gt; {
906
- it('should return true if the string is longer than 0 and less than or equal to 100 characters', <span class="fstat-no" title="function not covered" >() =</span>&gt; {
907
- <span class="cstat-no" title="statement not covered" > assert(validations.isCustomerReference('1'), 'isCustomerReference fails when the string length is 1');</span>
908
- <span class="cstat-no" title="statement not covered" > assert(validations.isCustomerReference('Spots of sunshine lie on the surface of the water dance, dance, and their reflections wobble.'), 'isCustomerReference fails when the string length is 100');</span>
1150
+ it('should return true if the string is longer than 0 and less than or equal to 100 characters', () =&gt; {
1151
+ assert(validations.isCustomerReference('1'), 'isCustomerReference fails when the string length is 1');
1152
+ assert(validations.isCustomerReference('Spots of sunshine lie on the surface of the water dance, dance, and their reflections wobble.'), 'isCustomerReference fails when the string length is 100');
909
1153
  });
910
1154
  &nbsp;
911
- it('should return false when passed an empty string or one longer than 100 characters, or a non-string', <span class="fstat-no" title="function not covered" >() =</span>&gt; {
912
- <span class="cstat-no" title="statement not covered" > assert(!validations.isCustomerReference(''), 'isCustomerReference passes when passed an empty string');</span>
913
- <span class="cstat-no" title="statement not covered" > assert(!validations.isCustomerReference('Little spots of sunshine lie on the surface of the water and dance, dance, and their reflections wobble deliciously over the ceiling;'), 'isCustomerReference passes with string over 100 characters');</span>
914
- <span class="cstat-no" title="statement not covered" > assert(!validations.isCustomerReference(['array']), 'isCustomerReference passes when passed a non-string');</span>
1155
+ it('should return false when passed an empty string or one longer than 100 characters, or a non-string', () =&gt; {
1156
+ assert(!validations.isCustomerReference(''), 'isCustomerReference passes when passed an empty string');
1157
+ assert(!validations.isCustomerReference('Little spots of sunshine lie on the surface of the water and dance, dance, and their reflections wobble deliciously over the ceiling;'), 'isCustomerReference passes with string over 100 characters');
1158
+ assert(!validations.isCustomerReference(['array']), 'isCustomerReference passes when passed a non-string');
915
1159
  });
916
1160
  });
917
1161
  &nbsp;
918
1162
  describe('isCustomerLabelName', () =&gt; {
919
- it('should return true if the string is longer than 0 and less than or equal to 50 characters', <span class="fstat-no" title="function not covered" >() =</span>&gt; {
920
- <span class="cstat-no" title="statement not covered" > assert(validations.isCustomerLabelName('1'), 'isCustomerLabelName fails when the string length is 1');</span>
921
- <span class="cstat-no" title="statement not covered" > assert(validations.isCustomerLabelName('William Shakespeare was poet, playwright and actor'), 'isCustomerLabelName fails when the string length is 50');</span>
1163
+ it('should return true if the string is longer than 0 and less than or equal to 50 characters', () =&gt; {
1164
+ assert(validations.isCustomerLabelName('1'), 'isCustomerLabelName fails when the string length is 1');
1165
+ assert(validations.isCustomerLabelName('William Shakespeare was poet, playwright and actor'), 'isCustomerLabelName fails when the string length is 50');
922
1166
  });
923
1167
  &nbsp;
924
- it('should return false when passed an empty string or one longer than 50 characters, or a non-string', <span class="fstat-no" title="function not covered" >() =</span>&gt; {
925
- <span class="cstat-no" title="statement not covered" > assert(!validations.isCustomerLabelName(''), 'isCustomerLabelName passes when passed an empty string');</span>
926
- <span class="cstat-no" title="statement not covered" > assert(!validations.isCustomerLabelName("Many of Shakespeare's plays were published in editions of varying quality and accuracy in his lifetime."), 'isCustomerLabelName passes with string over 50 characters');</span>
927
- <span class="cstat-no" title="statement not covered" > assert(!validations.isCustomerLabelName(['array']), 'isCustomerLabelName passes when passed a non-string');</span>
1168
+ it('should return false when passed an empty string or one longer than 50 characters, or a non-string', () =&gt; {
1169
+ assert(!validations.isCustomerLabelName(''), 'isCustomerLabelName passes when passed an empty string');
1170
+ assert(!validations.isCustomerLabelName("Many of Shakespeare's plays were published in editions of varying quality and accuracy in his lifetime."), 'isCustomerLabelName passes with string over 50 characters');
1171
+ assert(!validations.isCustomerLabelName(['array']), 'isCustomerLabelName passes when passed a non-string');
928
1172
  });
929
1173
  });
930
1174
  });
931
1175
  &nbsp;
932
1176
  describe('BCH', () =&gt; {
933
1177
  describe('isAddress', () =&gt; {
934
- it('should correctly validate valid BCH addresses', <span class="fstat-no" title="function not covered" >() =</span>&gt; <span class="cstat-no" title="statement not covered" >validations.bitcoinCash.isAddress('bitcoincash:qrrfmt57avxfd2476gqxqq54djtcvjuzjc2qtsrzcw').should.be.true</span>
1178
+ it('should correctly validate valid BCH addresses', () =&gt; validations.bitcoinCash.isAddress('bitcoincash:qrrfmt57avxfd2476gqxqq54djtcvjuzjc2qtsrzcw').should.be.true
935
1179
  &amp;&amp; validations.bitcoinCash.isAddress('qqrxa0h9jqnc7v4wmj9ysetsp3y7w9l36u8gnnjulq').should.be.true);
936
1180
  &nbsp;
937
- it('should correctly validate an incorrect BCH address', <span class="fstat-no" title="function not covered" >() =</span>&gt; <span class="cstat-no" title="statement not covered" >validations.bitcoinCash.isAddress('qqrxa0h9jqnc7v4wmj3y7w9l36u8gnnjulq').should.be.false)</span>;
1181
+ it('should correctly validate an incorrect BCH address', () =&gt; validations.bitcoinCash.isAddress('qqrxa0h9jqnc7v4wmj3y7w9l36u8gnnjulq').should.be.false);
938
1182
  });
939
1183
  &nbsp;
940
1184
  describe('isTxHash', () =&gt; {
941
- it('should correctly validate a valid BCH hash', <span class="fstat-no" title="function not covered" >() =</span>&gt; <span class="cstat-no" title="statement not covered" >validations.bitcoinCash.isTxHash('a32c4d2f9f2e322f19867dbacb7609a1be63c914b8f41775082b50d3ee1a0ce6').should.be.true)</span>;
1185
+ it('should correctly validate a valid BCH hash', () =&gt; validations.bitcoinCash.isTxHash('a32c4d2f9f2e322f19867dbacb7609a1be63c914b8f41775082b50d3ee1a0ce6').should.be.true);
942
1186
  &nbsp;
943
- it('should correctly validate an incorrect BCH hash', <span class="fstat-no" title="function not covered" >() =</span>&gt; <span class="cstat-no" title="statement not covered" >validations.bitcoinCash.isTxHash('cd1bdc201022ca9386d8757b1c49ecc6ee3769cad2d42ab6e7f9e7bd831').should.be.false)</span>;
1187
+ it('should correctly validate an incorrect BCH hash', () =&gt; validations.bitcoinCash.isTxHash('cd1bdc201022ca9386d8757b1c49ecc6ee3769cad2d42ab6e7f9e7bd831').should.be.false);
944
1188
  &nbsp;
945
- it('should return false when passed a non-hex string', <span class="fstat-no" title="function not covered" >() =</span>&gt; <span class="cstat-no" title="statement not covered" >validations.bitcoinCash.isTxHash('Not a hex string!').should.be.false)</span>;
1189
+ it('should return false when passed a non-hex string', () =&gt; validations.bitcoinCash.isTxHash('Not a hex string!').should.be.false);
946
1190
  });
947
1191
  });
948
1192
  &nbsp;
949
1193
  describe('BNB', () =&gt; {
950
1194
  describe('isAddress', () =&gt; {
951
- it('should correctly validate valid BNB addresses', <span class="fstat-no" title="function not covered" >() =</span>&gt; <span class="cstat-no" title="statement not covered" >validations.binanceCoin.isAddress('bnb1z35wusfv8twfele77vddclka9z84ugywug48gn').should.be.true)</span>;
1195
+ it('should correctly validate valid BNB addresses', () =&gt; validations.binanceChain.isAddress('bnb1z35wusfv8twfele77vddclka9z84ugywug48gn').should.be.true);
952
1196
  &nbsp;
953
- it('should correctly validate an incorrect BNB address', <span class="fstat-no" title="function not covered" >() =</span>&gt; <span class="cstat-no" title="statement not covered" >validations.binanceCoin.isAddress('bnb1z35wusfv8twfele77vddclka9z84ugywug48gn1').should.be.false)</span>;
1197
+ it('should correctly validate an incorrect BNB address', () =&gt; validations.binanceChain.isAddress('bnb1z35wusfv8twfele77vddclka9z84ugywug48gn1').should.be.false);
954
1198
  });
955
1199
  &nbsp;
956
1200
  describe('isTxHash', () =&gt; {
957
- it('should correctly validate a valid BNB hash', <span class="fstat-no" title="function not covered" >() =</span>&gt; <span class="cstat-no" title="statement not covered" >validations.binanceCoin.isTxHash('E68C2D178F989DE296FA1B513D1AA138B234C436B52E0D755C6664A70F7EEF7B').should.be.true)</span>;
1201
+ it('should correctly validate a valid BNB hash', () =&gt; validations.binanceChain.isTxHash('E68C2D178F989DE296FA1B513D1AA138B234C436B52E0D755C6664A70F7EEF7B').should.be.true);
958
1202
  &nbsp;
959
- it('should correctly validate an incorrect BNB hash', <span class="fstat-no" title="function not covered" >() =</span>&gt; <span class="cstat-no" title="statement not covered" >validations.binanceCoin.isTxHash('E68C2D178F989DE296FA1B513D1AA138B234C436B52E0D755C6664A70F7EEF7B1').should.be.false)</span>;
1203
+ it('should correctly validate an incorrect BNB hash', () =&gt; validations.binanceChain.isTxHash('E68C2D178F989DE296FA1B513D1AA138B234C436B52E0D755C6664A70F7EEF7B1').should.be.false);
960
1204
  &nbsp;
961
- it('should return false when passed a non-hex string', <span class="fstat-no" title="function not covered" >() =</span>&gt; <span class="cstat-no" title="statement not covered" >validations.binanceCoin.isTxHash('Not a hex string!').should.be.false)</span>;
1205
+ it('should return false when passed a non-hex string', () =&gt; validations.binanceChain.isTxHash('Not a hex string!').should.be.false);
962
1206
  });
963
1207
  });
964
1208
  &nbsp;
965
1209
  describe('BTC', () =&gt; {
966
1210
  describe('isAddress', () =&gt; {
967
- it('should correctly validate a valid BTC address', <span class="fstat-no" title="function not covered" >() =</span>&gt; <span class="cstat-no" title="statement not covered" >validations.bitcoin.isAddress('1LFnX5KT4CMKud7KB9xaXFZFkD3H8bUD16').should.be.true)</span>;
1211
+ it('should correctly validate a valid BTC address', () =&gt; validations.bitcoin.isAddress('1LFnX5KT4CMKud7KB9xaXFZFkD3H8bUD16').should.be.true);
968
1212
  &nbsp;
969
- it('should correctly validate an incorrect BTC address', <span class="fstat-no" title="function not covered" >() =</span>&gt; <span class="cstat-no" title="statement not covered" >validations.bitcoin.isAddress('1LFnX5KT4CMKud7KB9xaXFZFkD3H8b').should.be.false)</span>;
1213
+ it('should correctly validate an incorrect BTC address', () =&gt; validations.bitcoin.isAddress('1LFnX5KT4CMKud7KB9xaXFZFkD3H8b').should.be.false);
970
1214
  });
971
1215
  &nbsp;
972
1216
  describe('isBech32Address', () =&gt; {
973
- it('should correctly validate a Bech32 address', <span class="fstat-no" title="function not covered" >() =</span>&gt; <span class="cstat-no" title="statement not covered" >validations.bitcoin.isBech32Address('bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq').should.be.true)</span>;
974
- it('should correctly validate an invalide Bech32 address', <span class="fstat-no" title="function not covered" >() =</span>&gt; <span class="cstat-no" title="statement not covered" >validations.bitcoin.isBech32Address('4ef47f6eb681d5d9fa2f7e16336cd629303c635e8da51e425b76088be9c8744c').should.be.false)</span>;
1217
+ it('should correctly validate a Bech32 address', () =&gt; validations.bitcoin.isBech32Address('bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq').should.be.true);
1218
+ it('should correctly validate an invalide Bech32 address', () =&gt; validations.bitcoin.isBech32Address('4ef47f6eb681d5d9fa2f7e16336cd629303c635e8da51e425b76088be9c8744c').should.be.false);
975
1219
  });
976
1220
  &nbsp;
977
1221
  describe('isHDPublicKey', () =&gt; {
978
- it('should return true when passed an HD public key', <span class="fstat-no" title="function not covered" >() =</span>&gt; <span class="cstat-no" title="statement not covered" >validations.bitcoin.isHDPublicKey('xprv9s21ZrQH143K3QTDL4LXw2F7HEK3wJUD2nW2nRk4stbPy6cq3jPPqjiChkVvvNKmPGJxWUtg6LnF5kejMRNNU3TGtRBeJgk33yuGBxrMPHi').should.be.true)</span>;
979
- it('should return false when not passed an HD public key', <span class="fstat-no" title="function not covered" >() =</span>&gt; <span class="cstat-no" title="statement not covered" >validations.bitcoin.isHDPublicKey('bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq').should.be.false)</span>;
1222
+ it('should return true when passed an HD public key', () =&gt; validations.bitcoin.isHDPublicKey('xprv9s21ZrQH143K3QTDL4LXw2F7HEK3wJUD2nW2nRk4stbPy6cq3jPPqjiChkVvvNKmPGJxWUtg6LnF5kejMRNNU3TGtRBeJgk33yuGBxrMPHi').should.be.true);
1223
+ it('should return false when not passed an HD public key', () =&gt; validations.bitcoin.isHDPublicKey('bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq').should.be.false);
980
1224
  });
981
1225
  &nbsp;
982
1226
  describe('isPublicKey', () =&gt; {
983
- it('should return true when passed a public key', <span class="fstat-no" title="function not covered" >() =</span>&gt; <span class="cstat-no" title="statement not covered" >validations.bitcoin.isPublicKey('046c04c02f1138f440e8c5e9099db938bfba93d0389528bb7f6bf423ae203a2edcfba133f0409023d7ea13ac01c5aeedaf0bbfbeb8b82e9b48410d93a296da5b0c').should.be.true)</span>;
984
- it('should return false when not passed a public key', <span class="fstat-no" title="function not covered" >() =</span>&gt; <span class="cstat-no" title="statement not covered" >validations.bitcoin.isPublicKey('1EHNa6Q4Jz2uvNExL497mE43ikXhwF6kZm').should.be.false)</span>;
1227
+ it('should return true when passed a public key', () =&gt; validations.bitcoin.isPublicKey('046c04c02f1138f440e8c5e9099db938bfba93d0389528bb7f6bf423ae203a2edcfba133f0409023d7ea13ac01c5aeedaf0bbfbeb8b82e9b48410d93a296da5b0c').should.be.true);
1228
+ it('should return false when not passed a public key', () =&gt; validations.bitcoin.isPublicKey('1EHNa6Q4Jz2uvNExL497mE43ikXhwF6kZm').should.be.false);
985
1229
  });
986
1230
  &nbsp;
987
1231
  describe('isTxHash', () =&gt; {
988
- it('should correctly validate a valid BTC hash', <span class="fstat-no" title="function not covered" >() =</span>&gt; <span class="cstat-no" title="statement not covered" >validations.bitcoin.isTxHash('835346f3ea00a23df60ca5dc24afce67810c792ac4505e544410d4b19e7c95a0').should.be.true)</span>;
989
- it('should correctly validate an incorrect BTC hash', <span class="fstat-no" title="function not covered" >() =</span>&gt; <span class="cstat-no" title="statement not covered" >validations.bitcoin.isTxHash('835346f3ea00a23df60caafce67810c792ac4505e544410d4b19e7c95a0').should.be.false)</span>;
990
- it('should return false if the string passed is not a hex string', <span class="fstat-no" title="function not covered" >() =</span>&gt; <span class="cstat-no" title="statement not covered" >validations.bitcoin.isTxHex('Definitely not a hex string').should.be.false)</span>;
1232
+ it('should correctly validate a valid BTC hash', () =&gt; validations.bitcoin.isTxHash('835346f3ea00a23df60ca5dc24afce67810c792ac4505e544410d4b19e7c95a0').should.be.true);
1233
+ it('should correctly validate an incorrect BTC hash', () =&gt; validations.bitcoin.isTxHash('835346f3ea00a23df60caafce67810c792ac4505e544410d4b19e7c95a0').should.be.false);
1234
+ it('should return false if the string passed is not a hex string', () =&gt; validations.bitcoin.isTxHex('Definitely not a hex string').should.be.false);
991
1235
  });
992
1236
  &nbsp;
993
1237
  describe('isTxHex', () =&gt; {
994
1238
  const hex = '0100000002d8c8df6a6fdd2addaf589a83d860f18b44872d13ee6ec3526b2b470d42a96d4d000000008b483045022100b31557e47191936cb14e013fb421b1860b5e4fd5d2bc5ec1938f4ffb1651dc8902202661c2920771fd29dd91cd4100cefb971269836da4914d970d333861819265ba014104c54f8ea9507f31a05ae325616e3024bd9878cb0a5dff780444002d731577be4e2e69c663ff2da922902a4454841aa1754c1b6292ad7d317150308d8cce0ad7abffffffff2ab3fa4f68a512266134085d3260b94d3b6cfd351450cff021c045a69ba120b2000000008b4830450220230110bc99ef311f1f8bda9d0d968bfe5dfa4af171adbef9ef71678d658823bf022100f956d4fcfa0995a578d84e7e913f9bb1cf5b5be1440bcede07bce9cd5b38115d014104c6ec27cffce0823c3fecb162dbd576c88dd7cda0b7b32b0961188a392b488c94ca174d833ee6a9b71c0996620ae71e799fc7c77901db147fa7d97732e49c8226ffffffff02c0175302000000001976a914a3d89c53bb956f08917b44d113c6b2bcbe0c29b788acc01c3d09000000001976a91408338e1d5e26db3fce21b011795b1c3c8a5a5d0788ac00000000';
995
- it('should return true if passed a hex string Tx hash', <span class="fstat-no" title="function not covered" >() =</span>&gt; <span class="cstat-no" title="statement not covered" >validations.bitcoin.isTxHex(hex).should.be.true)</span>;
996
- it('should return false if the string passed is not a hex string', <span class="fstat-no" title="function not covered" >() =</span>&gt; <span class="cstat-no" title="statement not covered" >validations.bitcoin.isTxHex('definitelyNotAHexString').should.be.false)</span>;
997
- it('should return false if the string passed is a hex string, but is not a tx hash', <span class="fstat-no" title="function not covered" >() =</span>&gt; <span class="cstat-no" title="statement not covered" >validations.bitcoin.isTxHex('4ef47f6eb681d5d9fa2f7e16336cd629303c635e8da51e425b76088be9c8744c').should.be.false)</span>;
1239
+ it('should return true if passed a hex string Tx hash', () =&gt; validations.bitcoin.isTxHex(hex).should.be.true);
1240
+ it('should return false if the string passed is not a hex string', () =&gt; validations.bitcoin.isTxHex('definitelyNotAHexString').should.be.false);
1241
+ it('should return false if the string passed is a hex string, but is not a tx hash', () =&gt; validations.bitcoin.isTxHex('4ef47f6eb681d5d9fa2f7e16336cd629303c635e8da51e425b76088be9c8744c').should.be.false);
998
1242
  });
999
1243
  &nbsp;
1000
1244
  describe('isHDPath', () =&gt; {
1001
- it('should return true when passed a valid HDPrivateKey path', <span class="fstat-no" title="function not covered" >() =</span>&gt; <span class="cstat-no" title="statement not covered" >validations.bitcoin.isHDPath('xprv9s21ZrQH143K3QTDL4LXw2F7HEK3wJUD2nW2nRk4stbPy6cq3jPPqjiChkVvvNKmPGJxWUtg6LnF5kejMRNNU3TGtRBeJgk33yuGBxrMPHi'))</span>;
1002
- it('should return false when passed a string that is not a valid HDPrivateKey path', <span class="fstat-no" title="function not covered" >() =</span>&gt; <span class="cstat-no" title="statement not covered" >validations.bitcoin.isHDPath('bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq').should.be.false)</span>;
1245
+ it('should return true when passed a valid HDPrivateKey path', () =&gt; validations.bitcoin.isHDPath('xprv9s21ZrQH143K3QTDL4LXw2F7HEK3wJUD2nW2nRk4stbPy6cq3jPPqjiChkVvvNKmPGJxWUtg6LnF5kejMRNNU3TGtRBeJgk33yuGBxrMPHi'));
1246
+ it('should return false when passed a string that is not a valid HDPrivateKey path', () =&gt; validations.bitcoin.isHDPath('bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq').should.be.false);
1003
1247
  });
1004
1248
  &nbsp;
1005
1249
  describe('isScriptHex', () =&gt; {
1006
- it('should return true when passed a script hex', <span class="fstat-no" title="function not covered" >() =</span>&gt; <span class="cstat-no" title="statement not covered" >validations.bitcoin.isScriptHex('01000000011e2e8cfdf21d68f90974cd557a30c11894cc8cfec5cd5330e41846c2c84566bd000000006b4830450221009f61f453f44e807fdc538ca21710393d34005dd5709dabd8b6b9ccf09ea0b36a0220420d91a33f43d7b979471220e12cd1025975bd2e6c0bf2a14eb65ad89d578104012102de8f92034b9b3c956c1896d23a628537561e29faa772438aac2265c91ede6519ffffffff0118566202000000001976a914b27f04e510293c3e530e7b7bdf71f59118030e1e88ac00000000').should.be.true)</span>;
1007
- it('should return false if the string passed is not a hex string', <span class="fstat-no" title="function not covered" >() =</span>&gt; <span class="cstat-no" title="statement not covered" >validations.bitcoin.isScriptHex('definitelyNotAHexString').should.be.false)</span>;
1008
- it('should return false if the string passed is a hex string, but is not a script hex', <span class="fstat-no" title="function not covered" >() =</span>&gt; <span class="cstat-no" title="statement not covered" >validations.bitcoin.isScriptHex('mpXwg4jMtRhuSpVq4xS3HFHmCmWp9NyGKt').should.be.false)</span>;
1250
+ it('should return true when passed a script hex', () =&gt; validations.bitcoin.isScriptHex('01000000011e2e8cfdf21d68f90974cd557a30c11894cc8cfec5cd5330e41846c2c84566bd000000006b4830450221009f61f453f44e807fdc538ca21710393d34005dd5709dabd8b6b9ccf09ea0b36a0220420d91a33f43d7b979471220e12cd1025975bd2e6c0bf2a14eb65ad89d578104012102de8f92034b9b3c956c1896d23a628537561e29faa772438aac2265c91ede6519ffffffff0118566202000000001976a914b27f04e510293c3e530e7b7bdf71f59118030e1e88ac00000000').should.be.true);
1251
+ it('should return false if the string passed is not a hex string', () =&gt; validations.bitcoin.isScriptHex('definitelyNotAHexString').should.be.false);
1252
+ it('should return false if the string passed is a hex string, but is not a script hex', () =&gt; validations.bitcoin.isScriptHex('mpXwg4jMtRhuSpVq4xS3HFHmCmWp9NyGKt').should.be.false);
1009
1253
  });
1010
1254
  &nbsp;
1011
1255
  describe('isTxSignature', () =&gt; {
1012
- it('should return true when passed a tx hash that includes a signature', <span class="fstat-no" title="function not covered" >() =</span>&gt; <span class="cstat-no" title="statement not covered" >validations.bitcoin.isTxSignature('304502206e21798a42fae0e854281abd38bacd1aeed3ee3738d9e1446618c4571d1090db022100e2ac980643b0b82c0e88ffdfec6b64e3e6ba35e7ba5fdd7d5d6cc8d25c6b241501').should.be.true)</span>;
1013
- it('should return false when passed a tx hash that does not include a signature', <span class="fstat-no" title="function not covered" >() =</span>&gt; <span class="cstat-no" title="statement not covered" >validations.bitcoin.isTxSignature('f5d8ee39a430901c91a5917b9f2dc19d6d1a0e9cea205b009ca73dd04470b9a6').should.be.false)</span>;
1014
- it('should return false if the string passed is not a hex string', <span class="fstat-no" title="function not covered" >() =</span>&gt; <span class="cstat-no" title="statement not covered" >validations.bitcoin.isTxSignature('definitelyNotAHexString').should.be.false)</span>;
1256
+ it('should return true when passed a tx hash that includes a signature', () =&gt; validations.bitcoin.isTxSignature('304502206e21798a42fae0e854281abd38bacd1aeed3ee3738d9e1446618c4571d1090db022100e2ac980643b0b82c0e88ffdfec6b64e3e6ba35e7ba5fdd7d5d6cc8d25c6b241501').should.be.true);
1257
+ it('should return false when passed a tx hash that does not include a signature', () =&gt; validations.bitcoin.isTxSignature('f5d8ee39a430901c91a5917b9f2dc19d6d1a0e9cea205b009ca73dd04470b9a6').should.be.false);
1258
+ it('should return false if the string passed is not a hex string', () =&gt; validations.bitcoin.isTxSignature('definitelyNotAHexString').should.be.false);
1015
1259
  });
1016
1260
  &nbsp;
1017
1261
  describe('isBlockHeight', () =&gt; {
1018
- it('should return true when passed a value greater than or equal to 0', <span class="fstat-no" title="function not covered" >() =</span>&gt; <span class="cstat-no" title="statement not covered" >validations.bitcoin.isBlockHeight(986789).should.be.true</span>
1262
+ it('should return true when passed a value greater than or equal to 0', () =&gt; validations.bitcoin.isBlockHeight(986789).should.be.true
1019
1263
  &amp;&amp; validations.bitcoin.isBlockHeight('987654').should.be.true);
1020
- it('should return false when passed a value that is not greater than or equal to 0', <span class="fstat-no" title="function not covered" >() =</span>&gt; <span class="cstat-no" title="statement not covered" >validations.bitcoin.isBlockHeight(null).should.be.false</span>
1264
+ it('should return false when passed a value that is not greater than or equal to 0', () =&gt; validations.bitcoin.isBlockHeight(null).should.be.false
1021
1265
  &amp;&amp; validations.bitcoin.isBlockHeight('string').should.be.false);
1022
1266
  });
1023
1267
  });
1024
1268
  &nbsp;
1025
1269
  describe('ETH', () =&gt; {
1026
1270
  describe('isAddress', () =&gt; {
1027
- it('should return true if the address evaluates as a web3 address', <span class="fstat-no" title="function not covered" >() =</span>&gt; <span class="cstat-no" title="statement not covered" >validations.ethereum.isAddress('0xa6Bc4b3fe7F2756124d30D896Fe4457711e9d214').should.be.true)</span>;
1028
- it('should return false if the address does not evaluate to a web3 address', <span class="fstat-no" title="function not covered" >() =</span>&gt; <span class="cstat-no" title="statement not covered" >validations.ethereum.isAddress('Bc4b3fe7F2756124d30D896Fe4457711e9d214').should.be.false)</span>;
1271
+ it('should return true if the address evaluates as a web3 address', () =&gt; validations.ethereum.isAddress('0xa6Bc4b3fe7F2756124d30D896Fe4457711e9d214').should.be.true);
1272
+ it('should return false if the address does not evaluate to a web3 address', () =&gt; validations.ethereum.isAddress('Bc4b3fe7F2756124d30D896Fe4457711e9d214').should.be.false);
1029
1273
  });
1030
1274
  &nbsp;
1031
1275
  describe('isBlockHash', () =&gt; {
1032
- it('should return true when given a valid hash', <span class="fstat-no" title="function not covered" >() =</span>&gt; <span class="cstat-no" title="statement not covered" >validations.ethereum.isBlockHash('0xec6491abd46a1a9a71b78f4b84d96fd49525aa4f66c8d8c3588c489f2f88eb0e').should.be.true)</span>;
1033
- it('should return false when given an vinalid hash', <span class="fstat-no" title="function not covered" >() =</span>&gt; <span class="cstat-no" title="statement not covered" >validations.ethereum.isBlockHash('0xec6491abd46a1a9a71b78f4b84d96fd49525aa4f66c8d8c3588c489eb0e').should.be.false)</span>;
1276
+ it('should return true when given a valid hash', () =&gt; validations.ethereum.isBlockHash('0xec6491abd46a1a9a71b78f4b84d96fd49525aa4f66c8d8c3588c489f2f88eb0e').should.be.true);
1277
+ it('should return false when given an vinalid hash', () =&gt; validations.ethereum.isBlockHash('0xec6491abd46a1a9a71b78f4b84d96fd49525aa4f66c8d8c3588c489eb0e').should.be.false);
1034
1278
  });
1035
1279
  &nbsp;
1036
1280
  describe('isTxHash', () =&gt; {
1037
- it('should correctly validate a valid ETH hash', <span class="fstat-no" title="function not covered" >() =</span>&gt; <span class="cstat-no" title="statement not covered" >validations.ethereum.isTxHash('0xec6491abd46a1a9a71b78f4b84d96fd49525aa4f66c8d8c3588c489f2f88eb0e').should.be.true)</span>;
1281
+ it('should correctly validate a valid ETH hash', () =&gt; validations.ethereum.isTxHash('0xec6491abd46a1a9a71b78f4b84d96fd49525aa4f66c8d8c3588c489f2f88eb0e').should.be.true);
1038
1282
  &nbsp;
1039
- it('should correctly validate an incorrect ETH hash', <span class="fstat-no" title="function not covered" >() =</span>&gt; <span class="cstat-no" title="statement not covered" >validations.ethereum.isTxHash('0xec6491abd46a1a9a71b7896fd49525aa4f66c8d8c3588c489f2f88eb0e').should.be.false)</span>;
1283
+ it('should correctly validate an incorrect ETH hash', () =&gt; validations.ethereum.isTxHash('0xec6491abd46a1a9a71b7896fd49525aa4f66c8d8c3588c489f2f88eb0e').should.be.false);
1040
1284
  });
1041
1285
  &nbsp;
1042
1286
  describe('isAddressCode', () =&gt; {
1043
- it('should return true if the string is a hex address', <span class="fstat-no" title="function not covered" >() =</span>&gt; <span class="cstat-no" title="statement not covered" >validations.ethereum.isAddressCode('0xa6Bc4b3fe7F2756124d30D896Fe4457711e9d214').should.be.true)</span>;
1044
- it('should return false if the string is not a hex address', <span class="fstat-no" title="function not covered" >() =</span>&gt; <span class="cstat-no" title="statement not covered" >validations.ethereum.isAddressCode('0xa6Bc4b3fe7F27yu124d30D896Fe4457711e9d214').should.be.false)</span>;
1287
+ it('should return true if the string is a hex address', () =&gt; validations.ethereum.isAddressCode('0xa6Bc4b3fe7F2756124d30D896Fe4457711e9d214').should.be.true);
1288
+ it('should return false if the string is not a hex address', () =&gt; validations.ethereum.isAddressCode('0xa6Bc4b3fe7F27yu124d30D896Fe4457711e9d214').should.be.false);
1045
1289
  });
1046
1290
  &nbsp;
1047
1291
  describe('isValidWeiAmount', () =&gt; {
1048
- it('should return true when passed an amount that evaluates to wei', <span class="fstat-no" title="function not covered" >() =</span>&gt; <span class="cstat-no" title="statement not covered" >validations.ethereum.isValidWeiAmount('7000000000000000').should.be.true)</span>;
1049
- it('should return false when passed an amount that is not valid in wei', <span class="fstat-no" title="function not covered" >() =</span>&gt; <span class="cstat-no" title="statement not covered" >validations.ethereum.isValidWeiAmount(7000000000000000).should.be.false</span>
1292
+ it('should return true when passed an amount that evaluates to wei', () =&gt; validations.ethereum.isValidWeiAmount('7000000000000000').should.be.true);
1293
+ it('should return false when passed an amount that is not valid in wei', () =&gt; validations.ethereum.isValidWeiAmount(7000000000000000).should.be.false
1050
1294
  &amp;&amp; validations.ethereum.isValidWeiAmount('1000.00').should.be.false);
1051
1295
  });
1052
1296
  });
1053
1297
  &nbsp;
1054
1298
  describe('LTC', () =&gt; {
1055
1299
  describe('isAddress', () =&gt; {
1056
- it('should correctly validate valid LTC addresses', <span class="fstat-no" title="function not covered" >() =</span>&gt; <span class="cstat-no" title="statement not covered" >validations.litecoin.isAddress('LMR7przNNMS3GpaD6Ygq64NxbsJsZAqGgM').should.be.true)</span>;
1300
+ it('should correctly validate valid LTC addresses', () =&gt; validations.litecoin.isAddress('LMR7przNNMS3GpaD6Ygq64NxbsJsZAqGgM').should.be.true);
1057
1301
  &nbsp;
1058
- it('should correctly validate an incorrect LTC address', <span class="fstat-no" title="function not covered" >() =</span>&gt; <span class="cstat-no" title="statement not covered" >validations.litecoin.isAddress('t1t8BzkNb8d98o8kpbwrjtUjMX3GMF').should.be.false)</span>;
1302
+ it('should correctly validate valid LTC MimbleWimble addresses', () =&gt; validations.litecoin.isAddress('ltcmweb1qq2aejfd7svtnqk0uq0cfkd9mr9sszypmx2phdu5qwfhlujazv2nxjqstgy3r5gkxesu5vv2v0tmlwdwhat3se36pwzwtlqm8ypxq3d2fggc8d7nq').should.be.true);
1303
+ &nbsp;
1304
+ it('should correctly validate an incorrect LTC address', () =&gt; validations.litecoin.isAddress('t1t8BzkNb8d98o8kpbwrjtUjMX3GMF').should.be.false);
1059
1305
  });
1060
1306
  &nbsp;
1061
1307
  describe('isTxHash', () =&gt; {
1062
- it('should correctly validate a valid LTC hash', <span class="fstat-no" title="function not covered" >() =</span>&gt; <span class="cstat-no" title="statement not covered" >validations.litecoin.isTxHash('b0b858b34675cc8f851e6a2174295ada574837422538efe9ca83ef405d2faf29').should.be.true)</span>;
1308
+ it('should correctly validate a valid LTC hash', () =&gt; validations.litecoin.isTxHash('b0b858b34675cc8f851e6a2174295ada574837422538efe9ca83ef405d2faf29').should.be.true);
1063
1309
  &nbsp;
1064
- it('should correctly validate an incorrect LTC hash', <span class="fstat-no" title="function not covered" >() =</span>&gt; <span class="cstat-no" title="statement not covered" >validations.litecoin.isTxHash('b0b858b34675cc8f851e6a2295ada574837422538efe9ca83ef405d2faf29').should.be.false)</span>;
1310
+ it('should correctly validate an incorrect LTC hash', () =&gt; validations.litecoin.isTxHash('b0b858b34675cc8f851e6a2295ada574837422538efe9ca83ef405d2faf29').should.be.false);
1065
1311
  &nbsp;
1066
- it('should return false when passed a non-hex string', <span class="fstat-no" title="function not covered" >() =</span>&gt; <span class="cstat-no" title="statement not covered" >validations.litecoin.isTxHash('Not a hex code here').should.be.false)</span>;
1312
+ it('should return false when passed a non-hex string', () =&gt; validations.litecoin.isTxHash('Not a hex code here').should.be.false);
1067
1313
  });
1068
1314
  });
1069
1315
  &nbsp;
1070
1316
  describe('XLM', () =&gt; {
1071
1317
  describe('isAddress', () =&gt; {
1072
- it('should correctly validate valid XLM addresses', <span class="fstat-no" title="function not covered" >() =</span>&gt; <span class="cstat-no" title="statement not covered" >validations.stellar.isAddress('GBH4TZYZ4IRCPO44CBOLFUHULU2WGALXTAVESQA6432MBJMABBB4GIYI').should.be.true)</span>;
1318
+ it('should correctly validate valid XLM addresses', () =&gt; validations.stellar.isAddress('GBH4TZYZ4IRCPO44CBOLFUHULU2WGALXTAVESQA6432MBJMABBB4GIYI').should.be.true);
1073
1319
  &nbsp;
1074
- it('should correctly validate an incorrect XLM address', <span class="fstat-no" title="function not covered" >() =</span>&gt; <span class="cstat-no" title="statement not covered" >validations.stellar.isAddress('GBH4TZYZ4IRCPO44CAAAAAAULU2WGALXTAVESQA6432MBJMABBB4GIYI').should.be.false)</span>;
1320
+ it('should correctly validate an incorrect XLM address', () =&gt; validations.stellar.isAddress('GBH4TZYZ4IRCPO44CAAAAAAULU2WGALXTAVESQA6432MBJMABBB4GIYI').should.be.false);
1075
1321
  });
1076
1322
  &nbsp;
1077
1323
  describe('isTxHash', () =&gt; {
1078
- it('should correctly validate a valid XLM hash', <span class="fstat-no" title="function not covered" >() =</span>&gt; <span class="cstat-no" title="statement not covered" >validations.stellar.isTxHash('dcf208070966a0f04dbff0be6abe5bc7ea2d77f16167e89e1869a8efc68ebe44').should.be.true)</span>;
1324
+ it('should correctly validate a valid XLM hash', () =&gt; validations.stellar.isTxHash('dcf208070966a0f04dbff0be6abe5bc7ea2d77f16167e89e1869a8efc68ebe44').should.be.true);
1079
1325
  &nbsp;
1080
- it('should correctly validate an incorrect XLM hash', <span class="fstat-no" title="function not covered" >() =</span>&gt; <span class="cstat-no" title="statement not covered" >validations.stellar.isTxHash('8ee1f64137b12d07f8d2ddd3460d78ecbe37ba671aa4e54af34de935cc2bba2ca').should.be.false)</span>;
1326
+ it('should correctly validate an incorrect XLM hash', () =&gt; validations.stellar.isTxHash('8ee1f64137b12d07f8d2ddd3460d78ecbe37ba671aa4e54af34de935cc2bba2ca').should.be.false);
1081
1327
  &nbsp;
1082
- it('should return false when passed a non-hex string', <span class="fstat-no" title="function not covered" >() =</span>&gt; <span class="cstat-no" title="statement not covered" >validations.stellar.isTxHash('Yet again this is not a hex string').should.be.false)</span>;
1328
+ it('should return false when passed a non-hex string', () =&gt; validations.stellar.isTxHash('Yet again this is not a hex string').should.be.false);
1083
1329
  });
1084
1330
  });
1085
1331
  &nbsp;
1086
1332
  describe('XRP', () =&gt; {
1087
1333
  describe('isAddress', () =&gt; {
1088
- it('should correctly validate valid XRP addresses', <span class="fstat-no" title="function not covered" >() =</span>&gt; <span class="cstat-no" title="statement not covered" >validations.ripple.isAddress('rDV3RhpWznRCmtpD17RNxg6t4Hg8NPV8mF').should.be.true)</span>;
1334
+ it('should correctly validate valid XRP addresses', () =&gt; validations.ripple.isAddress('rDV3RhpWznRCmtpD17RNxg6t4Hg8NPV8mF').should.be.true);
1089
1335
  &nbsp;
1090
- it('should correctly validate an incorrect XRP address', <span class="fstat-no" title="function not covered" >() =</span>&gt; <span class="cstat-no" title="statement not covered" >validations.ripple.isAddress('rDV3RhpWznRCmtpD17RNxg0t4Hg8NPV8mF').should.be.false)</span>;
1336
+ it('should correctly validate an incorrect XRP address', () =&gt; validations.ripple.isAddress('rDV3RhpWznRCmtpD17RNxg0t4Hg8NPV8mF').should.be.false);
1091
1337
  });
1092
1338
  &nbsp;
1093
1339
  describe('isTxHash', () =&gt; {
1094
- it('should correctly validate a valid XRP hash', <span class="fstat-no" title="function not covered" >() =</span>&gt; <span class="cstat-no" title="statement not covered" >validations.ripple.isTxHash('C6593DD2A32ED5120DF1FE80665B84A9CCAF06ADDC2EF89F720CBAC3E8069C0E').should.be.true)</span>;
1340
+ it('should correctly validate a valid XRP hash', () =&gt; validations.ripple.isTxHash('C6593DD2A32ED5120DF1FE80665B84A9CCAF06ADDC2EF89F720CBAC3E8069C0E').should.be.true);
1095
1341
  &nbsp;
1096
- it('should correctly validate an incorrect XRP hash', <span class="fstat-no" title="function not covered" >() =</span>&gt; <span class="cstat-no" title="statement not covered" >validations.ripple.isTxHash('C6593DD2A32ED5120DF1FE84A9CCAF06ADDC2EF89F720CBAC3E8069C0E').should.be.false)</span>;
1342
+ it('should correctly validate an incorrect XRP hash', () =&gt; validations.ripple.isTxHash('C6593DD2A32ED5120DF1FE84A9CCAF06ADDC2EF89F720CBAC3E8069C0E').should.be.false);
1097
1343
  &nbsp;
1098
- it('should return false when passed a non-hex string', <span class="fstat-no" title="function not covered" >() =</span>&gt; <span class="cstat-no" title="statement not covered" >validations.ripple.isTxHash('Yet again this is not a hex string').should.be.false)</span>;
1344
+ it('should return false when passed a non-hex string', () =&gt; validations.ripple.isTxHash('Yet again this is not a hex string').should.be.false);
1099
1345
  });
1100
1346
  });
1101
1347
  &nbsp;
1102
1348
  describe('ZEC', () =&gt; {
1103
1349
  describe('isAddress', () =&gt; {
1104
- it('should correctly validate valid ZEC addresses', <span class="fstat-no" title="function not covered" >() =</span>&gt; <span class="cstat-no" title="statement not covered" >validations.zcash.isAddress('t1Jxptj7GnXQRsLNH5wWnDrGwEipEB3aZtf').should.be.true)</span>;
1350
+ it('should correctly validate valid ZEC addresses', () =&gt; validations.zcash.isAddress('t1Jxptj7GnXQRsLNH5wWnDrGwEipEB3aZtf').should.be.true);
1105
1351
  &nbsp;
1106
- it('should correctly validate an incorrect ZEC address', <span class="fstat-no" title="function not covered" >() =</span>&gt; <span class="cstat-no" title="statement not covered" >validations.zcash.isAddress('t1Jxptj7GnXQRsLNH5wWnDrGwEipEB3aZtf1').should.be.false)</span>;
1352
+ it('should correctly validate an incorrect ZEC address', () =&gt; validations.zcash.isAddress('t1Jxptj7GnXQRsLNH5wWnDrGwEipEB3aZtf1').should.be.false);
1107
1353
  });
1108
1354
  &nbsp;
1109
1355
  describe('isTxHash', () =&gt; {
1110
- it('should correctly validate a valid ZEC hash', <span class="fstat-no" title="function not covered" >() =</span>&gt; <span class="cstat-no" title="statement not covered" >validations.zcash.isTxHash('715c23949b85581de432f174a9e7f4d3f9e74b008064e2c68e7a52b1ec38e961').should.be.true)</span>;
1356
+ it('should correctly validate a valid ZEC hash', () =&gt; validations.zcash.isTxHash('715c23949b85581de432f174a9e7f4d3f9e74b008064e2c68e7a52b1ec38e961').should.be.true);
1111
1357
  &nbsp;
1112
- it('should correctly validate an incorrect ZEC hash', <span class="fstat-no" title="function not covered" >() =</span>&gt; <span class="cstat-no" title="statement not covered" >validations.zcash.isTxHash('715c23949b85581de432f174a9e7f4d3f9e74b008064e2c68e7a52b1ec38e9611').should.be.false)</span>;
1358
+ it('should correctly validate an incorrect ZEC hash', () =&gt; validations.zcash.isTxHash('715c23949b85581de432f174a9e7f4d3f9e74b008064e2c68e7a52b1ec38e9611').should.be.false);
1113
1359
  &nbsp;
1114
- it('should return false when passed a non-hex string', <span class="fstat-no" title="function not covered" >() =</span>&gt; <span class="cstat-no" title="statement not covered" >validations.zcash.isTxHash('Yet again this is not a hex string').should.be.false)</span>;
1360
+ it('should return false when passed a non-hex string', () =&gt; validations.zcash.isTxHash('Yet again this is not a hex string').should.be.false);
1115
1361
  });
1116
1362
  });
1117
1363
  &nbsp;
1118
1364
  describe('ZEN', () =&gt; {
1119
1365
  describe('isAddress', () =&gt; {
1120
- it('should correctly validate valid ZEN addresses', <span class="fstat-no" title="function not covered" >() =</span>&gt; <span class="cstat-no" title="statement not covered" >validations.horizen.isAddress('znUovxhrE91tep6D7YtgSc3XJZoYQLVDwVn').should.be.true)</span>;
1366
+ it('should correctly validate valid ZEN addresses', () =&gt; validations.horizen.isAddress('znUovxhrE91tep6D7YtgSc3XJZoYQLVDwVn').should.be.true);
1121
1367
  &nbsp;
1122
- it('should correctly validate an incorrect ZEN address', <span class="fstat-no" title="function not covered" >() =</span>&gt; <span class="cstat-no" title="statement not covered" >validations.horizen.isAddress('znUovxhrE91tep6D7YtgSc3XJZoYQLVDwVn1').should.be.false)</span>;
1368
+ it('should correctly validate an incorrect ZEN address', () =&gt; validations.horizen.isAddress('znUovxhrE91tep6D7YtgSc3XJZoYQLVDwVn1').should.be.false);
1123
1369
  });
1124
1370
  &nbsp;
1125
1371
  describe('isTxHash', () =&gt; {
1126
- it('should correctly validate a valid ZEN hash', <span class="fstat-no" title="function not covered" >() =</span>&gt; <span class="cstat-no" title="statement not covered" >validations.horizen.isTxHash('e5d31deb3fee023758f0b79d06489df975fce9aa53351b9b5c8491e4c33c74b7').should.be.true)</span>;
1372
+ it('should correctly validate a valid ZEN hash', () =&gt; validations.horizen.isTxHash('e5d31deb3fee023758f0b79d06489df975fce9aa53351b9b5c8491e4c33c74b7').should.be.true);
1127
1373
  &nbsp;
1128
- it('should correctly validate an incorrect ZEN hash', <span class="fstat-no" title="function not covered" >() =</span>&gt; <span class="cstat-no" title="statement not covered" >validations.horizen.isTxHash('e5d31deb3fee023758f0b79d06489df975fce9aa53351b9b5c8491e4c33c74b71').should.be.false)</span>;
1374
+ it('should correctly validate an incorrect ZEN hash', () =&gt; validations.horizen.isTxHash('e5d31deb3fee023758f0b79d06489df975fce9aa53351b9b5c8491e4c33c74b71').should.be.false);
1129
1375
  &nbsp;
1130
- it('should return false when passed a non-hex string', <span class="fstat-no" title="function not covered" >() =</span>&gt; <span class="cstat-no" title="statement not covered" >validations.horizen.isTxHash('Yet again this is not a hex string').should.be.false)</span>;
1376
+ it('should return false when passed a non-hex string', () =&gt; validations.horizen.isTxHash('Yet again this is not a hex string').should.be.false);
1131
1377
  });
1132
1378
  });
1133
1379
  &nbsp;
1134
1380
  describe('ZIL', () =&gt; {
1135
1381
  describe('isAddress', () =&gt; {
1136
- it('should correctly validate valid ZIL addresses', <span class="fstat-no" title="function not covered" >() =</span>&gt; <span class="cstat-no" title="statement not covered" >validations.zilliqa.isAddress('zil1tw5rpejf96e76ty93l7c3dn0g79h2qhhdm28a4').should.be.true)</span>;
1382
+ it('should correctly validate valid ZIL addresses', () =&gt; validations.zilliqa.isAddress('zil1tw5rpejf96e76ty93l7c3dn0g79h2qhhdm28a4').should.be.true);
1383
+ &nbsp;
1384
+ it('should correctly validate an incorrect ZIL address', () =&gt; validations.zilliqa.isAddress('0x14456246cc53d31f0a2EB00FA0248F7aEbD3fa8').should.be.false);
1385
+ });
1386
+ &nbsp;
1387
+ describe('isTxHash', () =&gt; {
1388
+ it('should correctly validate a valid ZIL hash', () =&gt; validations.zilliqa.isTxHash('0xb9a04481c546258e339f8ce4cccdee3f179cc37a8f099f0608baf39e0a819f75').should.be.true);
1389
+ &nbsp;
1390
+ it('should correctly validate an incorrect ZIL hash', () =&gt; validations.zilliqa.isTxHash('0xb9a04481c546258e339f8ce4cccdee3f179cc37a8f099f0608baf39e0a819f7').should.be.false);
1391
+ &nbsp;
1392
+ it('should return false when passed a non-hex string', () =&gt; validations.zilliqa.isTxHash('Yet again this is not a hex string').should.be.false);
1393
+ });
1394
+ });
1395
+ &nbsp;
1396
+ describe('ALGO', () =&gt; {
1397
+ describe('isAddress', () =&gt; {
1398
+ it('should correctly validate valid ALGO addresses', () =&gt; validations.algorand.isAddress('GX3XLHSRMFTADVKJBBQBTZ6BKINW6ZO5JHXWGCWB4CPDNPDQ2PIYN4AVHQ').should.be.true);
1399
+ &nbsp;
1400
+ it('should correctly validate an incorrect ALGO address', () =&gt; validations.algorand.isAddress('GX3XLHBQBTZ6BKINW6ZO5JHXWGCWB4CPDNPDQ2PIYN4AVHQ').should.be.false);
1401
+ });
1402
+ &nbsp;
1403
+ describe('isTxHash', () =&gt; {
1404
+ it('should correctly validate a valid ALGO hash', () =&gt; validations.algorand.isTxHash('TDITWGH5FODF2EUSKBAZ4DDC323NDBCBCE6BSXVXTZBINTCVQVVQ').should.be.true);
1405
+ &nbsp;
1406
+ it('should correctly validate an incorrect ALGO hash', () =&gt; validations.algorand.isTxHash('TDITWGH5FOBAZ4DDC323NDBCBCE6BSXVXTZBINTCVQVVQ').should.be.false);
1407
+ &nbsp;
1408
+ it('should return false when passed a non-hex string', () =&gt; validations.algorand.isTxHash('Yet again this is not a hex string').should.be.false);
1409
+ });
1410
+ });
1411
+ &nbsp;
1412
+ describe('DOT', () =&gt; {
1413
+ describe('isAddress', () =&gt; {
1414
+ it('should correctly validate valid DOT addresses', () =&gt; validations.polkadot.isAddress('14YJztsPZEiKuKhU3qLd6JjiY4awfdUru8Xu7BDdZAUuG8S6').should.be.true);
1415
+ &nbsp;
1416
+ it('should correctly validate an incorrect DOT address', () =&gt; validations.polkadot.isAddress('14YJztsPZEiKuKjiY4awfdUru8Xu7BDdZAUuG8S6').should.be.false);
1417
+ });
1418
+ &nbsp;
1419
+ describe('isTxHash', () =&gt; {
1420
+ it('should correctly validate a valid DOT hash', () =&gt; validations.polkadot.isTxHash('0x975ba4cfd83dd7f4f6e2c1932f4aeb650391f00d57c3856907d668a99fd90609').should.be.true);
1421
+ &nbsp;
1422
+ it('should correctly validate an incorrect DOT hash', () =&gt; validations.polkadot.isTxHash('0x975ba4cfd83dd7f4f2f4aeb650391f00d57c3856907d668a99fd90609').should.be.false);
1423
+ &nbsp;
1424
+ it('should return false when passed a non-hex string', () =&gt; validations.polkadot.isTxHash('Yet again this is not a hex string').should.be.false);
1425
+ });
1426
+ });
1427
+ &nbsp;
1428
+ describe('ATOM', () =&gt; {
1429
+ describe('isAddress', () =&gt; {
1430
+ it('should correctly validate valid ATOM addresses', () =&gt; validations.cosmos.isAddress('cosmos153lf4zntqt33a4v0sm5cytrxyqn78q7kz8j8x5').should.be.true);
1431
+ &nbsp;
1432
+ it('should correctly validate an incorrect ATOM address', () =&gt; validations.cosmos.isAddress('kosmos153lf4zntqt33a4v0sm5cytrxyqn78q7kz8j8x5').should.be.false);
1433
+ &nbsp;
1434
+ it('should correctly validate an incorrect (too long) ATOM address', () =&gt; validations.cosmos.isAddress('cosmos153lf4zntqt33a4v0sm5cytrxyqn78q7kz8j8x50').should.be.false);
1435
+ });
1436
+ &nbsp;
1437
+ describe('isTxHash', () =&gt; {
1438
+ it('should correctly validate a valid ATOM hash', () =&gt; validations.cosmos.isTxHash('BFA0252193CCAA0592AF2A27541473E7F6422A9AD85CFC9525CF67FA2AA2CD6F').should.be.true);
1439
+ &nbsp;
1440
+ it('should correctly validate an incorrect ATOM hash', () =&gt; validations.cosmos.isTxHash('BFA0252193CCAA0592AF2A27541473E7').should.be.false);
1441
+ &nbsp;
1442
+ it('should return false when passed a non-hex string', () =&gt; validations.cosmos.isTxHash('ZZA0252193CCAA0592AF2A27541473E7F6422A9AD85CFC9525CF67FA2AA2CD6F').should.be.false);
1443
+ });
1444
+ });
1445
+ &nbsp;
1446
+ describe('SOL', () =&gt; {
1447
+ describe('isAddress', () =&gt; {
1448
+ it('should correctly validate valid SOL addresses', () =&gt; validations.solana.isAddress('A4JXQF7p9sHR5apRy2hVgKFAHHs7jdpQv9kFGLDit24T').should.be.true);
1449
+ &nbsp;
1450
+ it('should correctly validate an incorrect SOL address', () =&gt; validations.solana.isAddress('L0JXQF7p9sHR5apRy2hVgKFAHHs7jdpQv9kFGLDit24T').should.be.false);
1451
+ &nbsp;
1452
+ it('should correctly validate an incorrect (too long) SOL address', () =&gt; validations.solana.isAddress('A4JXQF7p9sHR5apRy2hVgKFAHHs7jdpQv9kFGLDit24TAAAAAAAAAAAAAAA').should.be.false);
1453
+ });
1454
+ &nbsp;
1455
+ describe('isTxHash', () =&gt; {
1456
+ it('should correctly validate a valid SOL hash', () =&gt; validations.solana.isTxHash('2WcPszZnXBLpu9WzLbGRfwzETPHfTRi4E8fmVedFT4bPYc1BiELG3Ldway6oPTSXpVJZRM4mqEdz2Uuh5n9VQp8x').should.be.true);
1457
+ &nbsp;
1458
+ it('should correctly validate an incorrect SOL hash', () =&gt; validations.solana.isTxHash('2WcPszZnXBLpu9WzLbGRfwzET').should.be.false);
1459
+ });
1460
+ });
1461
+ &nbsp;
1462
+ describe('BSC', () =&gt; {
1463
+ describe('isAddress', () =&gt; {
1464
+ it('should correctly validate valid BSC addresses', () =&gt; validations.binanceSmartChain.isAddress('0x5616e2b8acff064bf902b8a93cbd5da2ca1edc7c').should.be.true);
1465
+ &nbsp;
1466
+ it('should correctly validate an incorrect BSC address', () =&gt; validations.binanceSmartChain.isAddress('0xz616e2b8acff064bf902b8a93cbd5da2ca1edc7c').should.be.false);
1467
+ &nbsp;
1468
+ it('should correctly validate an incorrect (too long) BSC address', () =&gt; validations.binanceSmartChain.isAddress('0x5616e2b8acff064bf902b8a93cbd5da2ca1edc7caaaaa').should.be.false);
1469
+ });
1470
+ &nbsp;
1471
+ describe('isTxHash', () =&gt; {
1472
+ it('should correctly validate a valid BSC hash', () =&gt; validations.binanceSmartChain.isTxHash('0x1a17145af3bec32f653d8ebd4c2c1b800214b17a7f8abfdda020cb1f39abe269').should.be.true);
1473
+ &nbsp;
1474
+ it('should correctly validate an incorrect BSC hash', () =&gt; validations.binanceSmartChain.isTxHash('0x1a17145af3bec32f653d8ebd4c2c1b800214b17').should.be.false);
1475
+ });
1476
+ });
1477
+ &nbsp;
1478
+ describe('Polygon', () =&gt; {
1479
+ describe('isAddress', () =&gt; {
1480
+ it('should correctly validate valid Polygon addresses', () =&gt; validations.polygon.isAddress('0x286c2bd6e0585f396647cbfdbfe14b92600365bb').should.be.true);
1481
+ &nbsp;
1482
+ it('should correctly validate an incorrect Polygon address', () =&gt; validations.polygon.isAddress('0xz286c2bd6e0585f396647cbfdbfe14b92600365bb').should.be.false);
1483
+ &nbsp;
1484
+ it('should correctly validate an incorrect (too long) Polygon address', () =&gt; validations.polygon.isAddress('0x286c2bd6e0585f396647cbfdbfe14b92600365bba').should.be.false);
1485
+ });
1486
+ &nbsp;
1487
+ describe('isTxHash', () =&gt; {
1488
+ it('should correctly validate a valid Polygon hash', () =&gt; validations.polygon.isTxHash('0x45a491048477568dd2047a0a9b6be9cc491382e74823ea1bd53bbc67db54a867').should.be.true);
1489
+ &nbsp;
1490
+ it('should correctly validate an incorrect Polygon hash', () =&gt; validations.polygon.isTxHash('0x45a491048477568dd2047a0a9b6be9cc491382e74823e').should.be.false);
1491
+ });
1492
+ });
1493
+ &nbsp;
1494
+ describe('Filecoin', () =&gt; {
1495
+ describe('isAddress', () =&gt; {
1496
+ it('should correctly validate a valid Filecoin f0 address', () =&gt; validations.filecoin.isAddress('f01825161').should.be.true);
1497
+ &nbsp;
1498
+ it('should correctly validate a valid Filecoin f1 address', () =&gt; validations.filecoin.isAddress('f1xafi3wsh7q553efnumhgeomathrehwwd2mye7oy').should.be.true);
1499
+ &nbsp;
1500
+ it('should correctly validate a valid Filecoin f2 address', () =&gt; validations.filecoin.isAddress('f2vrab2ft4qc22mgfxgdrphd7ovvz6zs3nq3fv4oy').should.be.true);
1501
+ &nbsp;
1502
+ it('should correctly validate a valid Filecoin f3 address', () =&gt; validations.filecoin.isAddress('f3ug2ti4finql5bxyl5q56udn5lt462miuadjg3ur467wrj6bvbrksglxyv65zoxyz4mgte3joyce3oxkk4q7q').should.be.true);
1137
1503
  &nbsp;
1138
- it('should correctly validate an incorrect ZIL address', <span class="fstat-no" title="function not covered" >() =</span>&gt; <span class="cstat-no" title="statement not covered" >validations.zilliqa.isAddress('0x14456246cc53d31f0a2EB00FA0248F7aEbD3fa8').should.be.false)</span>;
1504
+ it('should correctly validate an invalid Filecoin address', () =&gt; validations.filecoin.isAddress('f4zvcxzvcxzvczvcasdgwere').should.be.false);
1139
1505
  });
1140
1506
  &nbsp;
1141
1507
  describe('isTxHash', () =&gt; {
1142
- it('should correctly validate a valid ZIL hash', <span class="fstat-no" title="function not covered" >() =</span>&gt; <span class="cstat-no" title="statement not covered" >validations.zilliqa.isTxHash('0xb9a04481c546258e339f8ce4cccdee3f179cc37a8f099f0608baf39e0a819f75').should.be.true)</span>;
1508
+ it('should correctly validate a valid Filecoin hash', () =&gt; validations.filecoin.isTxHash('bafy2bzacedcrpcs76f2ws445wnjix2kktsgca4vv6qbd7zua7pc5mnkpveg7m').should.be.true);
1143
1509
  &nbsp;
1144
- it('should correctly validate an incorrect ZIL hash', <span class="fstat-no" title="function not covered" >() =</span>&gt; <span class="cstat-no" title="statement not covered" >validations.zilliqa.isTxHash('0xb9a04481c546258e339f8ce4cccdee3f179cc37a8f099f0608baf39e0a819f7').should.be.false)</span>;
1510
+ it('should correctly validate an invalid Filecoin hash', () =&gt; validations.filecoin.isTxHash('bafy2bzacedcrpcs76f2ws445wnjix2kktsgca4vv6qbd7zua7pc5mnkpveg7').should.be.false);
1145
1511
  &nbsp;
1146
- it('should return false when passed a non-hex string', <span class="fstat-no" title="function not covered" >() =</span>&gt; <span class="cstat-no" title="statement not covered" >validations.zilliqa.isTxHash('Yet again this is not a hex string').should.be.false)</span>;
1512
+ it('should correctly validate an invalid Filecoin hash', () =&gt; validations.filecoin.isTxHash('fafy2bzacedcrpcs76f2ws445wnjix2kktsgca4vv6qbd7zua7pc5mnkpveg7m').should.be.false);
1147
1513
  });
1148
1514
  });
1149
1515
  });
@@ -1153,7 +1519,7 @@ describe('Validations', () =&gt; {
1153
1519
  </div><!-- /wrapper -->
1154
1520
  <div class='footer quiet pad2 space-top1 center small'>
1155
1521
  Code coverage
1156
- generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Wed May 05 2021 10:40:15 GMT+0100 (BST)
1522
+ generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Tue Oct 18 2022 17:03:56 GMT+0200 (CEST)
1157
1523
  </div>
1158
1524
  </div>
1159
1525
  <script src="../prettify.js"></script>