Page404.spec.js 798 B

12345678910111213141516171819202122232425262728
  1. import Vue from 'vue'
  2. import { shallowMount } from '@vue/test-utils'
  3. import CoreuiVue from '@coreui/vue'
  4. import Page404 from '@/views/pages/Page404'
  5. Vue.use(CoreuiVue)
  6. describe('Page404.vue', () => {
  7. it('has a name', () => {
  8. expect(Page404.name).toBe('Page404')
  9. })
  10. it('is Vue instance', () => {
  11. const wrapper = shallowMount(Page404)
  12. expect(wrapper.vm).toBeTruthy()
  13. })
  14. it('is Page500', () => {
  15. const wrapper = shallowMount(Page404)
  16. expect(wrapper.findComponent(Page404)).toBeTruthy()
  17. })
  18. it('should render correct content', () => {
  19. const wrapper = shallowMount(Page404)
  20. expect(wrapper.find('h1').text()).toMatch('404')
  21. })
  22. test('renders correctly', () => {
  23. const wrapper = shallowMount(Page404)
  24. expect(wrapper.element).toMatchSnapshot()
  25. })
  26. })