File tree Expand file tree Collapse file tree 2 files changed +36
-0
lines changed
Expand file tree Collapse file tree 2 files changed +36
-0
lines changed Original file line number Diff line number Diff line change @@ -126,4 +126,22 @@ describe('<HideAt />', () => {
126126 ) ) ;
127127 assert . deepStrictEqual ( $ . children ( ) . exists ( ) , false ) ;
128128 } ) ;
129+
130+ it ( 'hides its children if breakpoint is largeAndBelow and currentBreakpoint is medium' , ( ) => {
131+ const $ = mount ( (
132+ < HideAt breakpoint = "largeAndBelow" currentBreakpoint = "medium" >
133+ < div > Hello</ div >
134+ </ HideAt >
135+ ) ) ;
136+ assert . deepStrictEqual ( $ . children ( ) . exists ( ) , false ) ;
137+ } ) ;
138+
139+ it ( 'hides its children if breakpoint is largeAndBelow and currentBreakpoint is small' , ( ) => {
140+ const $ = mount ( (
141+ < HideAt breakpoint = "largeAndBelow" currentBreakpoint = "small" >
142+ < div > Hello</ div >
143+ </ HideAt >
144+ ) ) ;
145+ assert . deepStrictEqual ( $ . children ( ) . exists ( ) , false ) ;
146+ } ) ;
129147} ) ;
Original file line number Diff line number Diff line change @@ -117,4 +117,22 @@ describe('<ShowAt />', () => {
117117 ) ) ;
118118 assert . deepStrictEqual ( $ . children ( ) . exists ( ) , true ) ;
119119 } ) ;
120+
121+ it ( 'shows its children if breakpoint is largeAndBelow and currentBreakpoint is medium' , ( ) => {
122+ const $ = mount ( (
123+ < ShowAt breakpoint = "largeAndBelow" currentBreakpoint = "medium" >
124+ < div > Hello</ div >
125+ </ ShowAt >
126+ ) ) ;
127+ assert . deepStrictEqual ( $ . children ( ) . exists ( ) , true ) ;
128+ } ) ;
129+
130+ it ( 'shows its children if breakpoint is largeAndBelow and currentBreakpoint is small' , ( ) => {
131+ const $ = mount ( (
132+ < ShowAt breakpoint = "largeAndBelow" currentBreakpoint = "small" >
133+ < div > Hello</ div >
134+ </ ShowAt >
135+ ) ) ;
136+ assert . deepStrictEqual ( $ . children ( ) . exists ( ) , true ) ;
137+ } ) ;
120138} ) ;
You can’t perform that action at this time.
0 commit comments