@@ -39,7 +39,9 @@ describe('ReactSDKClient', () => {
39
39
getFeatureVariableBoolean : jest . fn ( ( ) => null ) ,
40
40
getFeatureVariableDouble : jest . fn ( ( ) => null ) ,
41
41
getFeatureVariableJSON : jest . fn ( ( ) => null ) ,
42
- getAllFeatureVariables : jest . fn ( ( ) => { return { } } ) ,
42
+ getAllFeatureVariables : jest . fn ( ( ) => {
43
+ return { } ;
44
+ } ) ,
43
45
getFeatureVariable : jest . fn ( ( ) => null ) ,
44
46
getFeatureVariableInteger : jest . fn ( ( ) => null ) ,
45
47
getFeatureVariableString : jest . fn ( ( ) => null ) ,
@@ -508,7 +510,7 @@ describe('ReactSDKClient', () => {
508
510
anyClient . getFeatureVariableInteger . mockReturnValue ( 10 ) ;
509
511
anyClient . getFeatureVariableDouble . mockReturnValue ( - 10.5 ) ;
510
512
anyClient . getFeatureVariableJSON . mockReturnValue ( {
511
- value : 'json value'
513
+ value : 'json value' ,
512
514
} ) ;
513
515
const instance = createInstance ( config ) ;
514
516
instance . setUser ( {
@@ -521,31 +523,31 @@ describe('ReactSDKClient', () => {
521
523
ivar : 10 ,
522
524
dvar : - 10.5 ,
523
525
jvar : {
524
- value : 'json value'
525
- }
526
+ value : 'json value' ,
527
+ } ,
526
528
} ) ;
527
529
} ) ;
528
530
} ) ;
529
531
530
532
describe ( 'getAllFeatureVariables' , ( ) => {
531
533
it ( 'returns an empty object when the inner SDK returns no variables' , ( ) => {
532
- const anyClient = mockInnerClient . getAllFeatureVariables as jest . Mock ;
534
+ const anyClient = mockInnerClient . getAllFeatureVariables as jest . Mock ;
533
535
anyClient . mockReturnValue ( { } ) ;
534
536
const instance = createInstance ( config ) ;
535
537
const result = instance . getAllFeatureVariables ( 'feat1' , 'user1' ) ;
536
538
expect ( result ) . toEqual ( { } ) ;
537
539
} ) ;
538
540
539
541
it ( 'returns an object with variables of all types returned from the inner sdk ' , ( ) => {
540
- const anyClient = mockInnerClient . getAllFeatureVariables as jest . Mock ;
542
+ const anyClient = mockInnerClient . getAllFeatureVariables as jest . Mock ;
541
543
anyClient . mockReturnValue ( {
542
544
bvar : true ,
543
545
svar : 'whatsup' ,
544
546
ivar : 10 ,
545
547
dvar : - 10.5 ,
546
548
jvar : {
547
- value : 'json value'
548
- }
549
+ value : 'json value' ,
550
+ } ,
549
551
} ) ;
550
552
const instance = createInstance ( config ) ;
551
553
instance . setUser ( {
@@ -558,8 +560,8 @@ describe('ReactSDKClient', () => {
558
560
ivar : 10 ,
559
561
dvar : - 10.5 ,
560
562
jvar : {
561
- value : 'json value'
562
- }
563
+ value : 'json value' ,
564
+ } ,
563
565
} ) ;
564
566
} ) ;
565
567
@@ -571,8 +573,8 @@ describe('ReactSDKClient', () => {
571
573
ivar : 10 ,
572
574
dvar : - 10.5 ,
573
575
jvar : {
574
- value : 'json value'
575
- }
576
+ value : 'json value' ,
577
+ } ,
576
578
} ) ;
577
579
const instance = createInstance ( config ) ;
578
580
instance . setUser ( {
@@ -588,8 +590,8 @@ describe('ReactSDKClient', () => {
588
590
ivar : 10 ,
589
591
dvar : - 10.5 ,
590
592
jvar : {
591
- value : 'json value'
592
- }
593
+ value : 'json value' ,
594
+ } ,
593
595
} ) ;
594
596
expect ( mockFn ) . toBeCalledTimes ( 1 ) ;
595
597
expect ( mockFn ) . toBeCalledWith ( 'feat1' , 'user1' , {
@@ -602,8 +604,8 @@ describe('ReactSDKClient', () => {
602
604
ivar : 11 ,
603
605
dvar : - 11.5 ,
604
606
jvar : {
605
- value : 'json another value'
606
- }
607
+ value : 'json another value' ,
608
+ } ,
607
609
} ) ;
608
610
result = instance . getAllFeatureVariables ( 'feat1' , 'user2' , {
609
611
bar : 'baz' ,
@@ -614,8 +616,8 @@ describe('ReactSDKClient', () => {
614
616
ivar : 11 ,
615
617
dvar : - 11.5 ,
616
618
jvar : {
617
- value : 'json another value'
618
- }
619
+ value : 'json another value' ,
620
+ } ,
619
621
} ) ;
620
622
expect ( mockInnerClient . getAllFeatureVariables ) . toBeCalledTimes ( 1 ) ;
621
623
expect ( mockInnerClient . getAllFeatureVariables ) . toBeCalledWith ( 'feat1' , 'user2' , { bar : 'baz' } ) ;
0 commit comments