Files
manja_ui_dev/tests/unit/views/widgets/Widgets.spec.js
T
2019-09-23 14:53:04 +02:00

27 lines
721 B
JavaScript

import Vue from 'vue'
import { shallowMount } from '@vue/test-utils'
import CoreuiVue from '@coreui/vue'
import Widgets from '@/views/widgets/Widgets'
import { CIconPlugin } from '@coreui/icons/vue'
Vue.use(CIconPlugin)
Vue.use(CoreuiVue)
describe('Widgets.vue', () => {
it('has a name', () => {
expect(Widgets.name).toBe('Widgets')
})
it('is Vue instance', () => {
const wrapper = shallowMount(Widgets)
expect(wrapper.isVueInstance()).toBe(true)
})
it('is Widgets', () => {
const wrapper = shallowMount(Widgets)
expect(wrapper.is(Widgets)).toBe(true)
})
test('renders correctly', () => {
const wrapper = shallowMount(Widgets)
expect(wrapper.element).toMatchSnapshot()
})
})