@@ -83,7 +83,7 @@ describe('PlotlyComponent', () => {
8383 component . ngDoCheck ( ) ;
8484 expect ( component . updatePlot ) . toHaveBeenCalledTimes ( 1 ) ;
8585
86- component . data ( ) [ 0 ] . y [ 0 ] = 12 ;
86+ component . data ( ) [ 0 ] [ 'y' ] [ 0 ] = 12 ;
8787 component . ngDoCheck ( ) ;
8888 expect ( component . updatePlot ) . toHaveBeenCalledTimes ( 2 ) ;
8989 done ( ) ;
@@ -97,14 +97,14 @@ describe('PlotlyComponent', () => {
9797 component . ngDoCheck ( ) ;
9898 expect ( component . updatePlot ) . not . toHaveBeenCalled ( ) ;
9999
100- componentRef . setInput ( 'layout' , { title : 'title two' } ) ;
100+ componentRef . setInput ( 'layout' , { title : { text : 'title two' } } ) ;
101101 component . ngDoCheck ( ) ;
102102 expect ( component . updatePlot ) . toHaveBeenCalled ( ) ;
103103
104104 component . ngDoCheck ( ) ;
105105 expect ( component . updatePlot ) . toHaveBeenCalledTimes ( 1 ) ;
106106
107- component . layout ( ) [ ' title' ] = 'title three ' ;
107+ component . layout ( ) . title = { text : 'title three ' } ;
108108 component . ngDoCheck ( ) ;
109109 expect ( component . updatePlot ) . toHaveBeenCalledTimes ( 2 ) ;
110110 done ( ) ;
@@ -197,21 +197,21 @@ describe('PlotlyComponent', () => {
197197 await component . createPlot ( ) ;
198198 await fixture . whenStable ( ) ;
199199
200- spyOn ( Plots , 'resize' ) . and . callThrough ( ) ;
200+ const spy = spyOn ( Plots , 'resize' ) . and . callThrough ( ) ;
201201
202202 window . dispatchEvent ( new Event ( 'resize' ) ) ;
203203 await fixture . whenStable ( ) ;
204204
205- expect ( Plots . resize ) . toHaveBeenCalled ( ) ;
206- Plots . resize . calls . reset ( ) ;
205+ expect ( spy ) . toHaveBeenCalled ( ) ;
206+ spy . calls . reset ( ) ;
207207
208208 fixture . destroy ( ) ;
209209 await fixture . whenStable ( ) ;
210210
211211 window . dispatchEvent ( new Event ( 'resize' ) ) ;
212212 await fixture . whenStable ( ) ;
213213
214- expect ( Plots . resize ) . not . toHaveBeenCalled ( ) ;
214+ expect ( spy ) . not . toHaveBeenCalled ( ) ;
215215 } ) ;
216216
217217
0 commit comments