refactor: change container component names
This commit is contained in:
@@ -1,24 +0,0 @@
|
||||
import Vue from 'vue'
|
||||
import CoreuiVue from '@coreui/vue'
|
||||
import DefaultHeaderDropdownAccnt from '@/containers/DefaultHeaderDropdownAccnt'
|
||||
import { shallowMount } from '@vue/test-utils';
|
||||
|
||||
Vue.use(CoreuiVue)
|
||||
|
||||
describe('DefaultHeaderDropdownAccnt.vue', () => {
|
||||
it('has a name', () => {
|
||||
expect(DefaultHeaderDropdownAccnt.name).toMatch('DefaultHeaderDropdownAccnt')
|
||||
})
|
||||
it('has a created hook', () => {
|
||||
expect(typeof DefaultHeaderDropdownAccnt.data).toMatch('function')
|
||||
})
|
||||
it('sets the correct default data', () => {
|
||||
expect(typeof DefaultHeaderDropdownAccnt.data).toMatch('function')
|
||||
const defaultData = DefaultHeaderDropdownAccnt.data()
|
||||
expect(defaultData.itemsCount).toBe(42)
|
||||
})
|
||||
test('renders correctly', () => {
|
||||
const wrapper = shallowMount(DefaultHeaderDropdownAccnt)
|
||||
expect(wrapper.element).toMatchSnapshot()
|
||||
})
|
||||
})
|
||||
+5
-5
@@ -1,7 +1,7 @@
|
||||
import CoreuiVue from '@coreui/vue'
|
||||
import { shallowMount, createLocalVue } from '@vue/test-utils';
|
||||
import VueRouter from 'vue-router'
|
||||
import DefaultContainer from '@/containers/DefaultContainer'
|
||||
import TheContainer from '@/containers/TheContainer'
|
||||
|
||||
const localVue = createLocalVue()
|
||||
localVue.use(VueRouter)
|
||||
@@ -9,19 +9,19 @@ const router = new VueRouter()
|
||||
|
||||
localVue.use(CoreuiVue)
|
||||
|
||||
describe('DefaultContainer.vue', () => {
|
||||
describe('TheContainer.vue', () => {
|
||||
it('has a name', () => {
|
||||
expect(DefaultContainer.name).toMatch('full')
|
||||
expect(TheContainer.name).toMatch('full')
|
||||
})
|
||||
test('renders correctly', () => {
|
||||
const wrapper = shallowMount(DefaultContainer, {
|
||||
const wrapper = shallowMount(TheContainer, {
|
||||
localVue,
|
||||
router
|
||||
})
|
||||
expect(wrapper.element).toMatchSnapshot()
|
||||
})
|
||||
it('is Vue instance', () => {
|
||||
const wrapper = shallowMount(DefaultContainer, {
|
||||
const wrapper = shallowMount(TheContainer, {
|
||||
localVue,
|
||||
router
|
||||
})
|
||||
@@ -0,0 +1,24 @@
|
||||
import Vue from 'vue'
|
||||
import CoreuiVue from '@coreui/vue'
|
||||
import TheHeaderDropdownAccnt from '@/containers/TheHeaderDropdownAccnt'
|
||||
import { shallowMount } from '@vue/test-utils';
|
||||
|
||||
Vue.use(CoreuiVue)
|
||||
|
||||
describe('TheHeaderDropdownAccnt.vue', () => {
|
||||
it('has a name', () => {
|
||||
expect(TheHeaderDropdownAccnt.name).toMatch('TheHeaderDropdownAccnt')
|
||||
})
|
||||
it('has a created hook', () => {
|
||||
expect(typeof TheHeaderDropdownAccnt.data).toMatch('function')
|
||||
})
|
||||
it('sets the correct default data', () => {
|
||||
expect(typeof TheHeaderDropdownAccnt.data).toMatch('function')
|
||||
const defaultData = TheHeaderDropdownAccnt.data()
|
||||
expect(defaultData.itemsCount).toBe(42)
|
||||
})
|
||||
test('renders correctly', () => {
|
||||
const wrapper = shallowMount(TheHeaderDropdownAccnt)
|
||||
expect(wrapper.element).toMatchSnapshot()
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user