refactor: minor changes

This commit is contained in:
woothu
2020-02-18 17:13:00 +01:00
parent 9ea0664841
commit f3a1e2269f
7 changed files with 31 additions and 17 deletions
+15 -3
View File
@@ -1,13 +1,23 @@
import CoreuiVue from '@coreui/vue'
import { shallowMount, createLocalVue } from '@vue/test-utils';
import VueRouter from 'vue-router'
import Vuex from 'vuex'
import TheContainer from '@/containers/TheContainer'
const localVue = createLocalVue()
localVue.use(Vuex)
localVue.use(VueRouter)
const router = new VueRouter()
localVue.use(CoreuiVue)
const store = new Vuex.Store({
state: {
darkMode: false,
sidebarShow: 'responsive',
sidebarMinimize: false,
asideShow: false
}
})
const router = new VueRouter()
describe('TheContainer.vue', () => {
it('has a name', () => {
@@ -15,13 +25,15 @@ describe('TheContainer.vue', () => {
})
test('renders correctly', () => {
const wrapper = shallowMount(TheContainer, {
store,
localVue,
router
router
})
expect(wrapper.element).toMatchSnapshot()
})
it('is Vue instance', () => {
const wrapper = shallowMount(TheContainer, {
store,
localVue,
router
})
@@ -2,7 +2,6 @@
exports[`TheFooter.vue renders correctly 1`] = `
<cfooter-stub
fixed="true"
tag="footer"
>
<div>
@@ -58,6 +58,7 @@ exports[`Tabs.vue renders correctly 1`] = `
</ctab-stub>
<ctab-stub
active="true"
activeclass="router-link-active"
event="click"
exactactiveclass="router-link-exact-active"
@@ -184,6 +185,7 @@ exports[`Tabs.vue renders correctly 1`] = `
<ccardbody-stub>
<ctabs-stub
activetab="1"
fade="true"
variant="tabs"
>
@@ -274,7 +276,6 @@ exports[`Tabs.vue renders correctly 1`] = `
variant="tabs"
>
<ctab-stub
active="true"
activeclass="router-link-active"
event="click"
exactactiveclass="router-link-exact-active"
@@ -298,6 +299,7 @@ exports[`Tabs.vue renders correctly 1`] = `
</ctab-stub>
<ctab-stub
active="true"
activeclass="router-link-active"
event="click"
exactactiveclass="router-link-exact-active"