Files
manja_ui_dev/tests/unit/App.spec.js
T
2020-07-16 12:31:55 +02:00

32 lines
676 B
JavaScript

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).toBe('App')
})
it('is Vue instance', () => {
const wrapper = shallowMount(App, {
localVue,
router
})
expect(wrapper.vm).toBeTruthy()
})
it('is App', () => {
const wrapper = shallowMount(App, {
localVue,
router
})
expect(wrapper.findComponent(App)).toBeTruthy()
})
})