Navs.spec.js 624 B

123456789101112131415161718192021222324
  1. import Vue from 'vue'
  2. import { shallowMount } from '@vue/test-utils'
  3. import CoreuiVue from '@coreui/vue'
  4. import Navs from '@/views/base/Navs'
  5. Vue.use(CoreuiVue)
  6. describe('Navs.vue', () => {
  7. it('has a name', () => {
  8. expect(Navs.name).toBe('Navs')
  9. })
  10. it('is Vue instance', () => {
  11. const wrapper = shallowMount(Navs)
  12. expect(wrapper.vm).toBeTruthy()
  13. })
  14. it('is Navbars', () => {
  15. const wrapper = shallowMount(Navs)
  16. expect(wrapper.findComponent(Navs)).toBeTruthy()
  17. })
  18. test('renders correctly', () => {
  19. const wrapper = shallowMount(Navs)
  20. expect(wrapper.element).toMatchSnapshot()
  21. })
  22. })