Add tests

This commit is contained in:
Jakub Juszczak
2016-09-23 12:59:17 +02:00
parent d6c3f50ba8
commit 74cedd4ec4
9 changed files with 149 additions and 12 deletions

View File

@@ -0,0 +1,17 @@
import Vue from 'vue'
import DoughnutChart from 'src/examples/DoughnutExample'
describe('DoughnutChart', () => {
it('should render a canvas', () => {
const vm = new Vue({
el: 'body',
replace: false,
template: '<doughnut-chart></doughnut-chart>',
components: { DoughnutChart }
})
expect(vm.$el.querySelector('#doughnut-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
})
})