(chart)
| 481 | // Presses and releases the mouse on a data element. Only the events the |
| 482 | // chart listens to are sent, since only those are handled. |
| 483 | async function pressPoint(chart) { |
| 484 | const point = chart.getDatasetMeta(0).data[1]; |
| 485 | for (const type of ['mousedown', 'mouseup', 'click']) { |
| 486 | if (chart.options.events.includes(type)) { |
| 487 | await triggerMouseEvent(chart, type, point); |
| 488 | } |
| 489 | } |
| 490 | } |
| 491 | |
| 492 | function createChart(events) { |
| 493 | const onClick = vi.fn(); |
no test coverage detected