Skip to content

Commit

Permalink
added test
Browse files Browse the repository at this point in the history
  • Loading branch information
LeeLenaleee committed May 5, 2022
1 parent 64f3308 commit e3b926a
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions test/specs/controller.polarArea.tests.js
@@ -1,6 +1,24 @@
describe('Chart.controllers.polarArea', function() {
describe('auto', jasmine.fixture.specs('controller.polarArea'));

it('should update the scale correctly when data visibility is changed', function() {
var expectedScaleMax = 1;
var chart = window.acquireChart({
type: 'polarArea',
data: {
datasets: [
{data: [100]}
],
labels: ['x']
}
});

chart.toggleDataVisibility(0);
chart.update();

expect(chart.scales.r.max).toBe(expectedScaleMax);
});

it('should be registered as dataset controller', function() {
expect(typeof Chart.controllers.polarArea).toBe('function');
});
Expand Down

0 comments on commit e3b926a

Please sign in to comment.