@@ -32,6 +32,24 @@ describe('Flags', () => {
3232      expect ( wrapper . find ( 'h4' ) . length ) . toBe ( 1 ) ; 
3333    } ) ; 
3434
35+     it ( 'should return nothing when we have no children or renderProps and flags is active (true)' ,  ( )  =>  { 
36+       const  Flags  =  getComponentWithContext ( { 
37+         variation : jest . fn ( ( )  =>  true ) 
38+       } ) ; 
39+       const  wrapper  =  mount ( < Flags  flag = "beta-only"  /> ) ; 
40+       expect ( wrapper . find ( 'Consumer' ) . children ( ) . length ) . toBe ( 0 ) ; 
41+     } ) ; 
42+ 
43+     it ( 'should return nothing when we have a children with a condition and flags is active (true)' ,  ( )  =>  { 
44+       const  Flags  =  getComponentWithContext ( { 
45+         variation : jest . fn ( ( )  =>  true ) 
46+       } ) ; 
47+       const  wrapper  =  mount ( 
48+         < Flags  flag = "beta-only" > { 1  ===  0  &&  < h4 > for beta users</ h4 > } </ Flags > 
49+       ) ; 
50+       expect ( wrapper . find ( 'Consumer' ) . children ( ) . length ) . toBe ( 0 ) ; 
51+     } ) ; 
52+ 
3553    it ( 'should return the component or element given by children props when flags is active (true) and there no renderProps defined' ,  ( )  =>  { 
3654      const  Flags  =  getComponentWithContext ( { 
3755        variation : jest . fn ( ( )  =>  true ) 
@@ -46,6 +64,7 @@ describe('Flags', () => {
4664          < h4  className = "children" > for beta users</ h4 > 
4765        </ Flags > 
4866      ) ; 
67+ 
4968      expect ( wrapper . find ( 'h4.fallbackRender' ) . length ) . toBe ( 0 ) ; 
5069      expect ( wrapper . find ( 'h4.children' ) . length ) . toBe ( 1 ) ; 
5170    } ) ; 
@@ -190,6 +209,14 @@ describe('Flags', () => {
190209      expect ( wrapper . find ( 'h4' ) . length ) . toBe ( 1 ) ; 
191210    } ) ; 
192211
212+     it ( 'should return nothing when we have no children or renderProps and flags is active (json)' ,  ( )  =>  { 
213+       const  Flags  =  getComponentWithContext ( { 
214+         variation : jest . fn ( ( )  =>  ( {  test1 : 1 ,  test2 : 2  } ) ) 
215+       } ) ; 
216+       const  wrapper  =  mount ( < Flags  flag = "multi-variant-json"  /> ) ; 
217+       expect ( wrapper . find ( 'Consumer' ) . children ( ) . length ) . toBe ( 0 ) ; 
218+     } ) ; 
219+ 
193220    it ( 'should return the component or element given by children props when flags is active (json) and there no renderProps defined' ,  ( )  =>  { 
194221      const  Flags  =  getComponentWithContext ( { 
195222        variation : jest . fn ( ( )  =>  ( {  test1 : 1 ,  test2 : 2  } ) ) 
0 commit comments