Skip to content

Commit e1d670d

Browse files
committed
update test to explicitly run clearCanvas method to ensure it doesn't throw an error
1 parent 80df1f8 commit e1d670d

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

test/specs/helpers.canvas.tests.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,15 @@ describe('Chart.helpers.canvas', function() {
2323
});
2424

2525
it('should not throw error when chart is null', function() {
26-
function createChart() {
27-
return acquireChart({}, {
26+
function createAndClearChart() {
27+
var chart = acquireChart({}, {
2828
canvas: null
2929
});
30+
31+
helpers.clearCanvas(chart.canvas, chart.ctx);
3032
}
3133

32-
expect(createChart).not.toThrow();
34+
expect(createAndClearChart).not.toThrow();
3335
});
3436
});
3537

0 commit comments

Comments
 (0)