@@ -525,20 +525,13 @@ const runTests = (successCase, failCase) => {
525
525
continue ;
526
526
}
527
527
// This specimen is not a Key, so testing is less straightforward.
528
- if ( method === 'scalar' || method === 'key' ) {
528
+ if ( method === 'scalar' || method === 'key' || method === 'null' ) {
529
529
successCase ( specimen , M . not ( M [ method ] ( ) ) ) ;
530
530
failCase (
531
531
specimen ,
532
532
M [ method ] ( ) ,
533
533
makeMessage ( '"[mysteryTag]"' , 'mysteryTag' , 'tagged' ) ,
534
534
) ;
535
- } else if ( method === 'null' ) {
536
- failCase (
537
- specimen ,
538
- M [ method ] ( ) ,
539
- simpleMethods . key ( '"[mysteryTag]"' , 'mysteryTag' , 'tagged' ) ,
540
- true ,
541
- ) ;
542
535
} else {
543
536
failCase (
544
537
specimen ,
@@ -557,21 +550,12 @@ const runTests = (successCase, failCase) => {
557
550
continue ;
558
551
}
559
552
// This specimen is not a Key, so testing is less straightforward.
560
- if ( method !== 'null' ) {
561
- successCase ( specimen , M . not ( M [ method ] ( ) ) ) ;
562
- failCase (
563
- specimen ,
564
- M [ method ] ( ) ,
565
- makeMessage ( '"[match:any]"' , 'match:any' , 'tagged' ) ,
566
- ) ;
567
- } else {
568
- failCase (
569
- specimen ,
570
- M [ method ] ( ) ,
571
- simpleMethods . key ( '"[match:any]"' , 'match:any' , 'tagged' ) ,
572
- true ,
573
- ) ;
574
- }
553
+ successCase ( specimen , M . not ( M [ method ] ( ) ) ) ;
554
+ failCase (
555
+ specimen ,
556
+ M [ method ] ( ) ,
557
+ makeMessage ( '"[match:any]"' , 'match:any' , 'tagged' ) ,
558
+ ) ;
575
559
}
576
560
}
577
561
{
@@ -583,21 +567,12 @@ const runTests = (successCase, failCase) => {
583
567
continue ;
584
568
}
585
569
// This specimen has an invalid payload for its tag, so testing is less straightforward.
586
- if ( method !== 'null' ) {
587
- const message =
588
- method === 'scalar' || method === 'key'
589
- ? makeMessage ( '"[match:any]"' , 'match:any' , 'tagged' )
590
- : 'match:any payload: 88 - Must be undefined' ;
591
- successCase ( specimen , M . not ( M [ method ] ( ) ) ) ;
592
- failCase ( specimen , M [ method ] ( ) , message ) ;
593
- } else {
594
- failCase (
595
- specimen ,
596
- M [ method ] ( ) ,
597
- simpleMethods . key ( '"[match:any]"' , 'match:any' , 'tagged' ) ,
598
- true ,
599
- ) ;
600
- }
570
+ const message =
571
+ method === 'scalar' || method === 'key' || method === 'null'
572
+ ? makeMessage ( '"[match:any]"' , 'match:any' , 'tagged' )
573
+ : 'match:any payload: 88 - Must be undefined' ;
574
+ successCase ( specimen , M . not ( M [ method ] ( ) ) ) ;
575
+ failCase ( specimen , M [ method ] ( ) , message ) ;
601
576
}
602
577
}
603
578
{
@@ -609,20 +584,13 @@ const runTests = (successCase, failCase) => {
609
584
continue ;
610
585
}
611
586
// This specimen is not a Key, so testing is less straightforward.
612
- if ( method === 'scalar' || method === 'key' ) {
587
+ if ( method === 'scalar' || method === 'key' || method === 'null' ) {
613
588
successCase ( specimen , M . not ( M [ method ] ( ) ) ) ;
614
589
failCase (
615
590
specimen ,
616
591
M [ method ] ( ) ,
617
592
makeMessage ( '"[match:remotable]"' , 'match:remotable' , 'tagged' ) ,
618
593
) ;
619
- } else if ( method === 'null' ) {
620
- failCase (
621
- specimen ,
622
- M [ method ] ( ) ,
623
- simpleMethods . key ( '"[match:remotable]"' , 'match:remotable' , 'tagged' ) ,
624
- true ,
625
- ) ;
626
594
} else {
627
595
failCase (
628
596
specimen ,
0 commit comments