@@ -160,22 +160,22 @@ describe('Plotly.toImage', function() {
160
160
. then ( function ( ) { return Plotly . toImage ( gd , { format : 'png' , imageDataOnly : true } ) ; } )
161
161
. then ( function ( d ) {
162
162
expect ( d . indexOf ( 'data:image/' ) ) . toBe ( - 1 ) ;
163
- expect ( d . length ) . toBeWithin ( 53660 , 1e3 ) ;
163
+ expect ( d . length ) . toBeWithin ( 53660 , 1e3 , 'png image length' ) ;
164
164
} )
165
165
. then ( function ( ) { return Plotly . toImage ( gd , { format : 'jpeg' , imageDataOnly : true } ) ; } )
166
166
. then ( function ( d ) {
167
167
expect ( d . indexOf ( 'data:image/' ) ) . toBe ( - 1 ) ;
168
- expect ( d . length ) . toBeWithin ( 43251 , 1e3 ) ;
168
+ expect ( d . length ) . toBeWithin ( 43251 , 5e3 , 'jpeg image length' ) ;
169
169
} )
170
170
. then ( function ( ) { return Plotly . toImage ( gd , { format : 'svg' , imageDataOnly : true } ) ; } )
171
171
. then ( function ( d ) {
172
172
expect ( d . indexOf ( 'data:image/' ) ) . toBe ( - 1 ) ;
173
- expect ( d . length ) . toBeWithin ( 39485 , 1e3 ) ;
173
+ expect ( d . length ) . toBeWithin ( 39485 , 1e3 , 'svg image length' ) ;
174
174
} )
175
175
. then ( function ( ) { return Plotly . toImage ( gd , { format : 'webp' , imageDataOnly : true } ) ; } )
176
176
. then ( function ( d ) {
177
177
expect ( d . indexOf ( 'data:image/' ) ) . toBe ( - 1 ) ;
178
- expect ( d . length ) . toBeWithin ( 15831 , 1e3 ) ;
178
+ expect ( d . length ) . toBeWithin ( 15831 , 1e3 , 'webp image length' ) ;
179
179
} )
180
180
. catch ( fail )
181
181
. then ( done ) ;
0 commit comments