Files
manja_ui_dev/tests/unit/views/base/Popovers.spec.js
T
2021-03-12 13:52:47 +01:00

35 lines
829 B
JavaScript

import Vue from 'vue'
import { shallowMount } from '@vue/test-utils'
import CoreuiVue from '@coreui/vue'
import Popovers from '@/views/base/Popovers'
Vue.use(CoreuiVue)
describe('Popovers.vue', () => {
it('has a name', () => {
expect(Popovers.name).toBe('Popovers')
})
it('has a created hook', () => {
expect(typeof Popovers.data).toMatch('function')
})
it('is Vue instance', () => {
const wrapper = shallowMount(Popovers)
expect(wrapper.vm).toBeTruthy()
})
it('is Popovers', () => {
const wrapper = shallowMount(Popovers)
expect(wrapper.findComponent(Popovers)).toBeTruthy()
})
})
if (global.document) {
document.createRange = () => ({
setStart: () => {},
setEnd: () => {},
commonAncestorContainer: {
nodeName: 'BODY',
ownerDocument: document,
},
});
}