chore: move tooling to vue-cli v3.0.0-rc.2

This commit is contained in:
xidedix
2018-06-15 19:53:13 +02:00
parent 58fd280d51
commit 9e31783d91
58 changed files with 197 additions and 1093 deletions
+29
View File
@@ -0,0 +1,29 @@
import Vue from 'vue'
import { shallowMount } from '@vue/test-utils'
import BootstrapVue from 'bootstrap-vue'
import Dashboard from '@/views/Dashboard'
Vue.use(BootstrapVue)
describe('Dashboard.vue', () => {
it('has a created hook', () => {
expect(typeof Dashboard.data).toMatch('function')
})
it('sets the correct default data', () => {
expect(typeof Dashboard.data).toMatch('function')
const defaultData = Dashboard.data()
expect(defaultData.selected).toMatch('Month')
})
it('is Vue instance', () => {
const wrapper = shallowMount(Dashboard)
expect(wrapper.isVueInstance()).toBe(true)
})
it('is Dashboard', () => {
const wrapper = shallowMount(Dashboard)
expect(wrapper.is(Dashboard)).toBe(true)
})
// it('should render correct content', () => {
// const wrapper = shallowMount(Dashboard)
// expect(wrapper.find('h4 > #traffic').text()).toMatch('Traffic')
// })
})