test(container): add test init

This commit is contained in:
Rachel 2020-08-05 19:06:05 +08:00 committed by Herrington Darkholme
parent dfe4a6176b
commit 61f6604d02

View File

@ -1,5 +1,9 @@
import { mount } from '@vue/test-utils'
import Container from '../src/container.vue'
import Header from '../src/header.vue'
import Main from '../src/main.vue'
import Aside from '../src/aside.vue'
import Footer from '../src/footer.vue'
const AXIOM = 'Rem is the best girl'
@ -13,3 +17,31 @@ describe('Container.vue', () => {
expect(wrapper.text()).toEqual(AXIOM)
})
})
describe('Header', () => {
test('create', () => {
const wrapper = mount(Header)
expect(wrapper.classes()).toContain('el-header')
})
})
describe('Main', () => {
test('create', () => {
const wrapper = mount(Main)
expect(wrapper.classes()).toContain('el-main')
})
})
describe('Aside', () => {
test('create', () => {
const wrapper = mount(Aside)
expect(wrapper.classes()).toContain('el-aside')
})
})
describe('Footer', () => {
test('create', () => {
const wrapper = mount(Footer)
expect(wrapper.classes()).toContain('el-footer')
})
})