File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed
Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -161,8 +161,7 @@ describe('Annotation plugin', function() {
161161 }
162162 }
163163 } ) ;
164- const state = window [ 'chartjs-plugin-annotation' ] . _getState ( chart ) ;
165- const element = state . elements [ 0 ] ;
164+ const element = window . getAnnotationElements ( chart ) [ 0 ] ;
166165 expect ( element . options . drawTime ) . toBe ( 'fallback' ) ;
167166 } ) ;
168167
@@ -186,8 +185,7 @@ describe('Annotation plugin', function() {
186185 }
187186 }
188187 } ) ;
189- const state = window [ 'chartjs-plugin-annotation' ] . _getState ( chart ) ;
190- const element = state . elements [ 0 ] ;
188+ const element = window . getAnnotationElements ( chart ) [ 0 ] ;
191189 expect ( element . options . drawTime ) . toBe ( 'afterDatasetsDraw' ) ;
192190 } ) ;
193191
@@ -209,8 +207,7 @@ describe('Annotation plugin', function() {
209207 }
210208 }
211209 } ) ;
212- const state = window [ 'chartjs-plugin-annotation' ] . _getState ( chart ) ;
213- const element = state . elements [ 0 ] ;
210+ const element = window . getAnnotationElements ( chart ) [ 0 ] ;
214211 expect ( element . options . drawTime ) . toBe ( chart . options . plugins . annotation . annotations . label . drawTime ) ;
215212 } ) ;
216213 } ) ;
You can’t perform that action at this time.
0 commit comments