App.spec.js 676 B

12345678910111213141516171819202122232425262728293031
  1. import { shallowMount, createLocalVue } from '@vue/test-utils'
  2. import VueRouter from 'vue-router'
  3. import CoreuiVue from '@coreui/vue'
  4. import App from '@/App'
  5. const localVue = createLocalVue()
  6. localVue.use(VueRouter)
  7. const router = new VueRouter()
  8. localVue.use(CoreuiVue)
  9. describe('App.vue', () => {
  10. it('has a name', () => {
  11. expect(App.name).toBe('App')
  12. })
  13. it('is Vue instance', () => {
  14. const wrapper = shallowMount(App, {
  15. localVue,
  16. router
  17. })
  18. expect(wrapper.vm).toBeTruthy()
  19. })
  20. it('is App', () => {
  21. const wrapper = shallowMount(App, {
  22. localVue,
  23. router
  24. })
  25. expect(wrapper.findComponent(App)).toBeTruthy()
  26. })
  27. })