2018-04-02 10:55:52 +02:00
|
|
|
describe('Chart namespace', function() {
|
|
|
|
describe('Chart', function() {
|
|
|
|
it('should a function (constructor)', function() {
|
|
|
|
expect(Chart instanceof Function).toBeTruthy();
|
|
|
|
});
|
|
|
|
it('should define "core" properties', function() {
|
|
|
|
expect(Chart instanceof Function).toBeTruthy();
|
|
|
|
expect(Chart.Animation instanceof Object).toBeTruthy();
|
2020-08-03 18:33:41 +02:00
|
|
|
expect(Chart.Animations instanceof Object).toBeTruthy();
|
2018-04-02 10:55:52 +02:00
|
|
|
expect(Chart.defaults instanceof Object).toBeTruthy();
|
|
|
|
expect(Chart.Element instanceof Object).toBeTruthy();
|
|
|
|
expect(Chart.Interaction instanceof Object).toBeTruthy();
|
|
|
|
expect(Chart.layouts instanceof Object).toBeTruthy();
|
2020-05-21 22:36:06 +02:00
|
|
|
|
|
|
|
expect(Chart.platforms.BasePlatform instanceof Function).toBeTruthy();
|
|
|
|
expect(Chart.platforms.BasicPlatform instanceof Function).toBeTruthy();
|
|
|
|
expect(Chart.platforms.DomPlatform instanceof Function).toBeTruthy();
|
|
|
|
|
2020-07-06 23:38:04 +02:00
|
|
|
expect(Chart.registry instanceof Object).toBeTruthy();
|
2018-04-02 23:43:28 +02:00
|
|
|
expect(Chart.Scale instanceof Object).toBeTruthy();
|
2018-04-02 10:55:52 +02:00
|
|
|
expect(Chart.Ticks instanceof Object).toBeTruthy();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
describe('Chart.elements', function() {
|
|
|
|
it('should contains "elements" classes', function() {
|
2020-10-20 14:18:56 +02:00
|
|
|
expect(Chart.elements.ArcElement instanceof Function).toBeTruthy();
|
|
|
|
expect(Chart.elements.BarElement instanceof Function).toBeTruthy();
|
|
|
|
expect(Chart.elements.LineElement instanceof Function).toBeTruthy();
|
|
|
|
expect(Chart.elements.PointElement instanceof Function).toBeTruthy();
|
2018-04-02 10:55:52 +02:00
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
describe('Chart.helpers', function() {
|
|
|
|
it('should be an object', function() {
|
|
|
|
expect(Chart.helpers instanceof Object).toBeTruthy();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|