Popovers.spec.js 829 B

12345678910111213141516171819202122232425262728293031323334
  1. import Vue from 'vue'
  2. import { shallowMount } from '@vue/test-utils'
  3. import CoreuiVue from '@coreui/vue'
  4. import Popovers from '@/views/base/Popovers'
  5. Vue.use(CoreuiVue)
  6. describe('Popovers.vue', () => {
  7. it('has a name', () => {
  8. expect(Popovers.name).toBe('Popovers')
  9. })
  10. it('has a created hook', () => {
  11. expect(typeof Popovers.data).toMatch('function')
  12. })
  13. it('is Vue instance', () => {
  14. const wrapper = shallowMount(Popovers)
  15. expect(wrapper.vm).toBeTruthy()
  16. })
  17. it('is Popovers', () => {
  18. const wrapper = shallowMount(Popovers)
  19. expect(wrapper.findComponent(Popovers)).toBeTruthy()
  20. })
  21. })
  22. if (global.document) {
  23. document.createRange = () => ({
  24. setStart: () => {},
  25. setEnd: () => {},
  26. commonAncestorContainer: {
  27. nodeName: 'BODY',
  28. ownerDocument: document,
  29. },
  30. });
  31. }