test: restore and fix unit tests

This commit is contained in:
woothu
2019-08-10 12:07:10 +02:00
parent f9a4949b56
commit 704e04f9f6
89 changed files with 55790 additions and 6 deletions
+31
View File
@@ -0,0 +1,31 @@
import { shallowMount, createLocalVue } from '@vue/test-utils'
import VueRouter from 'vue-router'
import CoreuiVue from '@coreui/vue'
import App from '@/App'
const localVue = createLocalVue()
localVue.use(VueRouter)
const router = new VueRouter()
localVue.use(CoreuiVue)
describe('App.vue', () => {
it('has a name', () => {
expect(App.name).toMatch('app')
})
it('is Vue instance', () => {
const wrapper = shallowMount(App, {
localVue,
router
})
expect(wrapper.isVueInstance()).toBe(true)
})
it('is App', () => {
const wrapper = shallowMount(App, {
localVue,
router
})
expect(wrapper.is(App)).toBe(true)
})
})