Former-commit-id: fc487302ba97576964432ff24b99c6e687d06672 [formerly fc487302ba97576964432ff24b99c6e687d06672 [formerly fc487302ba97576964432ff24b99c6e687d06672 [formerly fc487302ba97576964432ff24b99c6e687d06672 [formerly 3ce644c6fe3fc0e6617686b41fcd10da604c0434 [formerly 8afb73852c720f85b70b7e3f7e0f5fde2b160d68]]]]] Former-commit-id: 86578fe55d249067355cb53631c14955273c87a3 Former-commit-id: 758553a45c4009274ca9796b88fe6593c42854fe Former-commit-id: 4cf284ab8301b196d40c4528263ff9a87b63a753 [formerly 8ac7ed5acfcb1ea2ee8b8d5e7839bc29a37fd9f7] Former-commit-id: d104856f24c0edbb908750468a314362526e83ed Former-commit-id: 6699d330fd44a39340cabb39067d39f7abe52cbe Former-commit-id: 67d9c3ddbe293b229b950c1f15e19d0293717411 Former-commit-id: 828fdd495ce25236fc162137b9472515790f37cf Former-commit-id: 5c046db642e86c04fe8e8ae553ffe686c8083afc
31 lines
797 B
JavaScript
31 lines
797 B
JavaScript
import { mount } from '@vue/test-utils'
|
|
import D2ModuleIndexBanner from '@/components/d2-module-index-banner/index.vue'
|
|
|
|
describe('d2-module-index-banner', () => {
|
|
// 存在且是Vue组件实例
|
|
it('is a vue instance', () => {
|
|
const wrapper = mount(D2ModuleIndexBanner, {
|
|
stubs: ['d2-icon']
|
|
})
|
|
|
|
expect(wrapper.exists()).toBeTruthy()
|
|
expect(wrapper.isVueInstance()).toBeTruthy()
|
|
})
|
|
|
|
// props
|
|
it('has props', () => {
|
|
const wrapper = mount(D2ModuleIndexBanner, {
|
|
stubs: ['d2-icon'],
|
|
propsData: {
|
|
title: 'title',
|
|
subTitle: 'subTitle',
|
|
link: 'link'
|
|
}
|
|
})
|
|
|
|
expect(wrapper.props().title).toEqual('title')
|
|
expect(wrapper.props().subTitle).toEqual('subTitle')
|
|
expect(wrapper.props().link).toEqual('link')
|
|
})
|
|
})
|