chore: move tooling to vue-cli v3.0.0-rc.2
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
module.exports = {
|
||||
env: {
|
||||
jest: true
|
||||
},
|
||||
rules: {
|
||||
'import/no-extraneous-dependencies': 'off'
|
||||
}
|
||||
}
|
||||
@@ -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')
|
||||
// })
|
||||
})
|
||||
Reference in New Issue
Block a user