Add unit tests and travis.yml

This commit is contained in:
Jakub Juszczak
2016-09-08 13:21:20 +02:00
parent 377ae5e27a
commit d913e9c515
10 changed files with 156 additions and 2 deletions

View File

@@ -0,0 +1,17 @@
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
})
})