(el: ChartJS<any> | undefined | null)
| 16 | |
| 17 | let chart: any, update: any, destroy: any; |
| 18 | const ref = (el: ChartJS<any> | undefined | null): void => { |
| 19 | chart = el; |
| 20 | |
| 21 | if (chart) { |
| 22 | update = vi.spyOn(chart, 'update'); |
| 23 | destroy = vi.spyOn(chart, 'destroy'); |
| 24 | } |
| 25 | }; |
| 26 | |
| 27 | beforeEach(() => { |
| 28 | chart = null; |