mirror of
				https://github.com/KevinMidboe/vue-chartjs.git
				synced 2025-10-29 18:00:20 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			18 lines
		
	
	
		
			550 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			18 lines
		
	
	
		
			550 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| import Vue from 'vue'
 | |
| import BarChart from 'src/examples/BarExample'
 | |
| 
 | |
| describe('BarChart', () => {
 | |
|   it('should render a canvas', () => {
 | |
|     const vm = new Vue({
 | |
|       el: 'body',
 | |
|       replace: false,
 | |
|       template: '<bar-chart></bar-chart>',
 | |
|       components: { BarChart }
 | |
|     })
 | |
|     expect(vm.$el.querySelector('#bar-chart')).not.to.be.an('undefined')
 | |
|     expect(vm.$el.querySelector('canvas')).not.to.be.an('undefined')
 | |
|     expect(vm.$el.querySelector('canvas')).not.to.be.an('null')
 | |
|     expect(vm.$el.querySelector('canvas')).to.exist
 | |
|   })
 | |
| })
 |