test: added basic unit tests (except for charts). Unit tests segregated in directories.
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
import Vue from 'vue'
|
||||
import { shallowMount } from '@vue/test-utils'
|
||||
import BootstrapVue from 'bootstrap-vue'
|
||||
import Component from '@/views/PATH'
|
||||
|
||||
Vue.use(BootstrapVue)
|
||||
|
||||
const ComponentName = 'COMPONENT_NAME'
|
||||
const wrapper = shallowMount(Component)
|
||||
|
||||
describe(ComponentName + '.vue', () => {
|
||||
it('has a name', () => {
|
||||
expect(Component.name).toMatch(ComponentName)
|
||||
})
|
||||
it('is Vue instance', () => {
|
||||
expect(wrapper.isVueInstance()).toBe(true)
|
||||
})
|
||||
it('has a created hook', () => {
|
||||
expect(typeof Component.data).toMatch('function')
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user