File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ describe('LazyLoad', () => {
4747 expect ( document . querySelector ( '.lazyload-placeholder' ) ) . to . exist ;
4848 expect ( document . querySelector ( '.treasure' ) ) . to . not . exist ;
4949 } ) ;
50-
50+
5151 it ( 'should NOT update when invisble' , ( done ) => {
5252 ReactDOM . render (
5353 < div >
@@ -145,6 +145,16 @@ describe('LazyLoad', () => {
145145 expect ( document . querySelector ( '.custom-lazyload-wrapper' ) ) . to . exist ;
146146 expect ( document . querySelector ( '.custom-lazyload-placeholder' ) ) . to . exist ;
147147 } ) ;
148+ it ( 'should render wrapper with `style` when provided' , ( ) => {
149+ ReactDOM . render (
150+ < div >
151+ < LazyLoad height = { 9999 } classNamePrefix = "custom-lazyload" style = { { height : 200 } } >
152+ < span > 123</ span >
153+ </ LazyLoad >
154+ </ div > , div ) ;
155+ console . log ( div . innerHTML ) ;
156+ expect ( document . querySelector ( '.custom-lazyload-wrapper' ) . getBoundingClientRect ( ) . height ) . to . equal ( 200 ) ;
157+ } )
148158 } ) ;
149159
150160 describe ( 'Checking visibility' , ( ) => {
You can’t perform that action at this time.
0 commit comments