mirror of
https://github.com/element-plus/element-plus.git
synced 2024-11-27 02:01:15 +08:00
test(container): add test init
This commit is contained in:
parent
dfe4a6176b
commit
61f6604d02
@ -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')
|
||||
})
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user