Fix: config.platform was ignored (#9442)

This commit is contained in:
Jukka Kurkela
2021-07-20 14:51:16 +03:00
committed by GitHub
parent 8008488aba
commit bc7c58d46d
5 changed files with 40 additions and 25 deletions

View File

@@ -1935,4 +1935,14 @@ describe('Chart', function() {
expect(active[0].element).toBe(meta.data[0]);
});
});
describe('platform', function() {
it('should use the platform constructor provided in config', function() {
const chart = acquireChart({
platform: Chart.platforms.BasicPlatform,
type: 'line',
});
expect(chart.platform).toBeInstanceOf(Chart.platforms.BasicPlatform);
});
});
});