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() {
161
161
}
162
162
}
163
163
} ) ;
164
- const state = window [ 'chartjs-plugin-annotation' ] . _getState ( chart ) ;
165
- const element = state . elements [ 0 ] ;
164
+ const element = window . getAnnotationElements ( chart ) [ 0 ] ;
166
165
expect ( element . options . drawTime ) . toBe ( 'fallback' ) ;
167
166
} ) ;
168
167
@@ -186,8 +185,7 @@ describe('Annotation plugin', function() {
186
185
}
187
186
}
188
187
} ) ;
189
- const state = window [ 'chartjs-plugin-annotation' ] . _getState ( chart ) ;
190
- const element = state . elements [ 0 ] ;
188
+ const element = window . getAnnotationElements ( chart ) [ 0 ] ;
191
189
expect ( element . options . drawTime ) . toBe ( 'afterDatasetsDraw' ) ;
192
190
} ) ;
193
191
@@ -209,8 +207,7 @@ describe('Annotation plugin', function() {
209
207
}
210
208
}
211
209
} ) ;
212
- const state = window [ 'chartjs-plugin-annotation' ] . _getState ( chart ) ;
213
- const element = state . elements [ 0 ] ;
210
+ const element = window . getAnnotationElements ( chart ) [ 0 ] ;
214
211
expect ( element . options . drawTime ) . toBe ( chart . options . plugins . annotation . annotations . label . drawTime ) ;
215
212
} ) ;
216
213
} ) ;
You can’t perform that action at this time.
0 commit comments