test: restore and fix unit tests

This commit is contained in:
woothu
2019-08-10 12:07:10 +02:00
parent f9a4949b56
commit 704e04f9f6
89 changed files with 55790 additions and 6 deletions
+28
View File
@@ -0,0 +1,28 @@
import Vue from 'vue'
import { shallowMount } from '@vue/test-utils'
import CoreuiVue from '@coreui/vue'
import Page500 from '@/views/pages/Page500'
Vue.use(CoreuiVue)
describe('Page500.vue', () => {
it('has a name', () => {
expect(Page500.name).toMatch('Page500')
})
it('is Vue instance', () => {
const wrapper = shallowMount(Page500)
expect(wrapper.isVueInstance()).toBe(true)
})
it('is Page500', () => {
const wrapper = shallowMount(Page500)
expect(wrapper.is(Page500)).toBe(true)
})
it('should render correct content', () => {
const wrapper = shallowMount(Page500)
expect(wrapper.find('h1').text()).toMatch('500')
})
test('renders correctly', () => {
const wrapper = shallowMount(Page500)
expect(wrapper.element).toMatchSnapshot()
})
})