* improve error message with id of the canvas
* update test
if (existingChart) {
throw new Error(
'Canvas is already in use. Chart with ID \'' + existingChart.id + '\'' +
- ' must be destroyed before the canvas can be reused.'
+ ' must be destroyed before the canvas with ID \'' + existingChart.canvas.id + '\' can be reused.'
);
}
expect(createChart).toThrow(new Error(
'Canvas is already in use. ' +
'Chart with ID \'' + chart.id + '\'' +
- ' must be destroyed before the canvas can be reused.'
+ ' must be destroyed before the canvas with ID \'' + chart.canvas.id + '\' can be reused.'
));
chart.destroy();