File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -170,10 +170,8 @@ describe('template interactions', function() {
170
170
171
171
if ( schooly ) {
172
172
var schoolItem = gd . layout . annotations [ layoutCount - 1 ] ;
173
- expect ( schoolItem ) . toEqual ( jasmine . objectContaining ( {
174
- templateitemname : 'warning2' ,
175
- x : 1
176
- } ) ) ;
173
+ expect ( schoolItem . templateitemname ) . toBe ( 'warning2' ) ;
174
+ expect ( schoolItem . x ) . toBeWithin ( 1 , 0.001 ) ;
177
175
expect ( schoolItem . y ) . toBeWithin ( schooly , 0.001 ) ;
178
176
}
179
177
@@ -208,11 +206,11 @@ describe('template interactions', function() {
208
206
209
207
if ( recty0 ) {
210
208
var rectItem = gd . layout . shapes [ layoutCount - 1 ] ;
211
- expect ( rectItem ) . toEqual ( jasmine . objectContaining ( {
212
- templateitemname : 'outline' ,
213
- x0 : - 0.15 , x1 : 1.2 , y1 : 1.1
214
- } ) ) ;
209
+ expect ( rectItem . templateitemname ) . toBe ( 'outline' ) ;
210
+ expect ( rectItem . x0 ) . toBeWithin ( - 0.15 , 0.001 ) ;
215
211
expect ( rectItem . y0 ) . toBeWithin ( recty0 , 0.001 ) ;
212
+ expect ( rectItem . x1 ) . toBeWithin ( 1.2 , 0.001 ) ;
213
+ expect ( rectItem . y1 ) . toBeWithin ( 1.1 , 0.001 ) ;
216
214
}
217
215
218
216
return rectElement ;
You can’t perform that action at this time.
0 commit comments