Slide 18
Slide 18 text
Write testing code.
import { shallowMount } from '@vue/test-utils'
import ChartLine from '@/components/ChartLine.vue'
describe('ChartLine.vue', () => {
it('matches snapshot', () => {
const values = [.1, .5, .4, .75, .6, .9]
const wrapper = shallowMount(ChartLine, {
propsData: { values }
})
expect(wrapper.html()).toMatchSnapshot()
})
})