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
+26
View File
@@ -0,0 +1,26 @@
import Vue from 'vue'
import { shallowMount, mount } from '@vue/test-utils'
import CoreuiVue from '@coreui/vue'
import Brands from '@/views/icons/Brands'
import { CIconPlugin } from '@coreui/icons/vue'
Vue.use(CIconPlugin)
Vue.use(CoreuiVue)
describe('Brands.vue', () => {
it('has a name', () => {
expect(Brands.name).toMatch('Brands')
})
it('is Vue instance', () => {
const wrapper = shallowMount(Brands)
expect(wrapper.isVueInstance()).toBe(true)
})
it('is Brands', () => {
const wrapper = shallowMount(Brands)
expect(wrapper.is(Brands)).toBe(true)
})
test('renders correctly', () => {
const wrapper = mount(Brands)
expect(wrapper.element).toMatchSnapshot()
})
})
@@ -0,0 +1,24 @@
import Vue from 'vue'
import { shallowMount, mount } from '@vue/test-utils'
import CoreuiVue from '@coreui/vue'
import CoreUIIcons from '@/views/icons/CoreUIIcons'
Vue.use(CoreuiVue)
describe('CoreUIIcons.vue', () => {
it('has a name', () => {
expect(CoreUIIcons.name).toMatch('CoreUIIcons')
})
it('is Vue instance', () => {
const wrapper = shallowMount(CoreUIIcons)
expect(wrapper.isVueInstance()).toBe(true)
})
it('is CoreUIIcons', () => {
const wrapper = shallowMount(CoreUIIcons)
expect(wrapper.is(CoreUIIcons)).toBe(true)
})
test('renders correctly', () => {
const wrapper = shallowMount(CoreUIIcons)
expect(wrapper.element).toMatchSnapshot()
})
})
+26
View File
@@ -0,0 +1,26 @@
import Vue from 'vue'
import { shallowMount, mount } from '@vue/test-utils'
import CoreuiVue from '@coreui/vue'
import { CIconPlugin } from '@coreui/icons/vue'
import Flags from '@/views/icons/Flags'
Vue.use(CoreuiVue)
Vue.use(CIconPlugin)
describe('Flags.vue', () => {
it('has a name', () => {
expect(Flags.name).toMatch('flags')
})
it('is Vue instance', () => {
const wrapper = shallowMount(Flags)
expect(wrapper.isVueInstance()).toBe(true)
})
it('is Flags', () => {
const wrapper = shallowMount(Flags)
expect(wrapper.is(Flags)).toBe(true)
})
test('renders correctly', () => {
const wrapper = shallowMount(Flags)
expect(wrapper.element).toMatchSnapshot()
})
})
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long