mirror of
				https://github.com/KevinMidboe/vue-chartjs.git
				synced 2025-10-29 18:00:20 +00:00 
			
		
		
		
	✅ 🐛 Fix tests
This commit is contained in:
		| @@ -10,7 +10,11 @@ describe('BarChart', () => { | |||||||
|  |  | ||||||
|   it('should render a canvas', () => { |   it('should render a canvas', () => { | ||||||
|     const vm = new Vue({ |     const vm = new Vue({ | ||||||
|       template: '<bar-chart></bar-chart>', |       render: function (createElement) { | ||||||
|  |         return createElement( | ||||||
|  |           BarChart | ||||||
|  |         ) | ||||||
|  |       }, | ||||||
|       components: { BarChart } |       components: { BarChart } | ||||||
|     }).$mount(el) |     }).$mount(el) | ||||||
|  |  | ||||||
| @@ -22,7 +26,15 @@ describe('BarChart', () => { | |||||||
|  |  | ||||||
|   it('should change id based on prop', () => { |   it('should change id based on prop', () => { | ||||||
|     const vm = new Vue({ |     const vm = new Vue({ | ||||||
|       template: '<bar-chart chartId="barchartprop"></bar-chart>', |       render: function (createElement) { | ||||||
|  |         return createElement( | ||||||
|  |           BarChart, { | ||||||
|  |             props: { | ||||||
|  |               chartId: 'barchartprop' | ||||||
|  |             } | ||||||
|  |           } | ||||||
|  |         ) | ||||||
|  |       }, | ||||||
|       components: { BarChart } |       components: { BarChart } | ||||||
|     }).$mount(el) |     }).$mount(el) | ||||||
|  |  | ||||||
|   | |||||||
| @@ -10,7 +10,11 @@ describe('BubbleChart', () => { | |||||||
|  |  | ||||||
|   it('should render a canvas', () => { |   it('should render a canvas', () => { | ||||||
|     const vm = new Vue({ |     const vm = new Vue({ | ||||||
|       template: '<bubble-chart></bubble-chart>', |       render: function (createElement) { | ||||||
|  |         return createElement( | ||||||
|  |           BubbleChart | ||||||
|  |         ) | ||||||
|  |       }, | ||||||
|       components: { BubbleChart } |       components: { BubbleChart } | ||||||
|     }).$mount(el) |     }).$mount(el) | ||||||
|  |  | ||||||
| @@ -22,7 +26,15 @@ describe('BubbleChart', () => { | |||||||
|  |  | ||||||
|   it('should change id based on prop', () => { |   it('should change id based on prop', () => { | ||||||
|     const vm = new Vue({ |     const vm = new Vue({ | ||||||
|       template: '<bubble-chart chartId="bubblechartprop"></bubble-chart>', |       render: function (createElement) { | ||||||
|  |         return createElement( | ||||||
|  |           BubbleChart, { | ||||||
|  |             props: { | ||||||
|  |               chartId: 'bubblechartprop' | ||||||
|  |             } | ||||||
|  |           } | ||||||
|  |         ) | ||||||
|  |       }, | ||||||
|       components: { BubbleChart } |       components: { BubbleChart } | ||||||
|     }).$mount(el) |     }).$mount(el) | ||||||
|  |  | ||||||
|   | |||||||
| @@ -10,7 +10,11 @@ describe('DoughnutChart', () => { | |||||||
|  |  | ||||||
|   it('should render a canvas', () => { |   it('should render a canvas', () => { | ||||||
|     const vm = new Vue({ |     const vm = new Vue({ | ||||||
|       template: '<doughnut-chart></doughnut-chart>', |       render: function (createElement) { | ||||||
|  |         return createElement( | ||||||
|  |           DoughnutChart | ||||||
|  |         ) | ||||||
|  |       }, | ||||||
|       components: { DoughnutChart } |       components: { DoughnutChart } | ||||||
|     }).$mount(el) |     }).$mount(el) | ||||||
|  |  | ||||||
| @@ -22,7 +26,15 @@ describe('DoughnutChart', () => { | |||||||
|  |  | ||||||
|   it('should change id based on prop', () => { |   it('should change id based on prop', () => { | ||||||
|     const vm = new Vue({ |     const vm = new Vue({ | ||||||
|       template: '<doughnut-chart chartId="doughnutchartprop"></doughnut-chart>', |       render: function (createElement) { | ||||||
|  |         return createElement( | ||||||
|  |           DoughnutChart, { | ||||||
|  |             props: { | ||||||
|  |               chartId: 'doughnutchartprop' | ||||||
|  |             } | ||||||
|  |           } | ||||||
|  |         ) | ||||||
|  |       }, | ||||||
|       components: { DoughnutChart } |       components: { DoughnutChart } | ||||||
|     }).$mount(el) |     }).$mount(el) | ||||||
|  |  | ||||||
|   | |||||||
| @@ -10,7 +10,11 @@ describe('LineChart', () => { | |||||||
|  |  | ||||||
|   it('should render a canvas', () => { |   it('should render a canvas', () => { | ||||||
|     const vm = new Vue({ |     const vm = new Vue({ | ||||||
|       template: '<line-chart></line-chart>', |       render: function (createElement) { | ||||||
|  |         return createElement( | ||||||
|  |           LineChart | ||||||
|  |         ) | ||||||
|  |       }, | ||||||
|       components: { LineChart } |       components: { LineChart } | ||||||
|     }).$mount(el) |     }).$mount(el) | ||||||
|  |  | ||||||
| @@ -22,7 +26,15 @@ describe('LineChart', () => { | |||||||
|  |  | ||||||
|   it('should change id based on prop', () => { |   it('should change id based on prop', () => { | ||||||
|     const vm = new Vue({ |     const vm = new Vue({ | ||||||
|       template: '<line-chart chartId="linechartprop"></line-chart>', |       render: function (createElement) { | ||||||
|  |         return createElement( | ||||||
|  |           LineChart, { | ||||||
|  |             props: { | ||||||
|  |               chartId: 'linechartprop' | ||||||
|  |             } | ||||||
|  |           } | ||||||
|  |         ) | ||||||
|  |       }, | ||||||
|       components: { LineChart } |       components: { LineChart } | ||||||
|     }).$mount(el) |     }).$mount(el) | ||||||
|  |  | ||||||
|   | |||||||
| @@ -10,7 +10,11 @@ describe('PieChart', () => { | |||||||
|  |  | ||||||
|   it('should render a canvas', () => { |   it('should render a canvas', () => { | ||||||
|     const vm = new Vue({ |     const vm = new Vue({ | ||||||
|       template: '<pie-chart></pie-chart>', |       render: function (createElement) { | ||||||
|  |         return createElement( | ||||||
|  |           PieChart | ||||||
|  |         ) | ||||||
|  |       }, | ||||||
|       components: { PieChart } |       components: { PieChart } | ||||||
|     }).$mount(el) |     }).$mount(el) | ||||||
|  |  | ||||||
| @@ -22,7 +26,15 @@ describe('PieChart', () => { | |||||||
|  |  | ||||||
|   it('should change id based on prop', () => { |   it('should change id based on prop', () => { | ||||||
|     const vm = new Vue({ |     const vm = new Vue({ | ||||||
|       template: '<pie-chart chartId="piechartprop"></pie-chart>', |       render: function (createElement) { | ||||||
|  |         return createElement( | ||||||
|  |           PieChart, { | ||||||
|  |             props: { | ||||||
|  |               chartId: 'piechartprop' | ||||||
|  |             } | ||||||
|  |           } | ||||||
|  |         ) | ||||||
|  |       }, | ||||||
|       components: { PieChart } |       components: { PieChart } | ||||||
|     }).$mount(el) |     }).$mount(el) | ||||||
|  |  | ||||||
|   | |||||||
| @@ -10,7 +10,11 @@ describe('PolarChart', () => { | |||||||
|  |  | ||||||
|   it('should render a canvas', () => { |   it('should render a canvas', () => { | ||||||
|     const vm = new Vue({ |     const vm = new Vue({ | ||||||
|       template: '<polar-chart></polar-chart>', |       render: function (createElement) { | ||||||
|  |         return createElement( | ||||||
|  |           PolarChart | ||||||
|  |         ) | ||||||
|  |       }, | ||||||
|       components: { PolarChart } |       components: { PolarChart } | ||||||
|     }).$mount(el) |     }).$mount(el) | ||||||
|  |  | ||||||
| @@ -22,7 +26,15 @@ describe('PolarChart', () => { | |||||||
|  |  | ||||||
|   it('should change id based on prop', () => { |   it('should change id based on prop', () => { | ||||||
|     const vm = new Vue({ |     const vm = new Vue({ | ||||||
|       template: '<polar-chart chartId="polarchartprop"></polar-chart>', |       render: function (createElement) { | ||||||
|  |         return createElement( | ||||||
|  |           PolarChart, { | ||||||
|  |             props: { | ||||||
|  |               chartId: 'polarchartprop' | ||||||
|  |             } | ||||||
|  |           } | ||||||
|  |         ) | ||||||
|  |       }, | ||||||
|       components: { PolarChart } |       components: { PolarChart } | ||||||
|     }).$mount(el) |     }).$mount(el) | ||||||
|  |  | ||||||
|   | |||||||
| @@ -10,7 +10,11 @@ describe('RadarChart', () => { | |||||||
|  |  | ||||||
|   it('should render a canvas', () => { |   it('should render a canvas', () => { | ||||||
|     const vm = new Vue({ |     const vm = new Vue({ | ||||||
|       template: '<radar-chart></radar-chart>', |       render: function (createElement) { | ||||||
|  |         return createElement( | ||||||
|  |           RadarChart | ||||||
|  |         ) | ||||||
|  |       }, | ||||||
|       components: { RadarChart } |       components: { RadarChart } | ||||||
|     }).$mount(el) |     }).$mount(el) | ||||||
|  |  | ||||||
| @@ -22,7 +26,15 @@ describe('RadarChart', () => { | |||||||
|  |  | ||||||
|   it('should change id based on prop', () => { |   it('should change id based on prop', () => { | ||||||
|     const vm = new Vue({ |     const vm = new Vue({ | ||||||
|       template: '<radar-chart chartId="rodarchartprop"></radar-chart>', |       render: function (createElement) { | ||||||
|  |         return createElement( | ||||||
|  |           RadarChart, { | ||||||
|  |             props: { | ||||||
|  |               chartId: 'rodarchartprop' | ||||||
|  |             } | ||||||
|  |           } | ||||||
|  |         ) | ||||||
|  |       }, | ||||||
|       components: { RadarChart } |       components: { RadarChart } | ||||||
|     }).$mount(el) |     }).$mount(el) | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user