unit test: d2-module-index-banner
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
This commit is contained in:
parent
59c5ffd751
commit
038ce98e5f
|
|
@ -56,10 +56,10 @@
|
||||||
"@kazupon/vue-i18n-loader": "^0.3.0",
|
"@kazupon/vue-i18n-loader": "^0.3.0",
|
||||||
"@vue/cli-plugin-babel": "^3.0.0",
|
"@vue/cli-plugin-babel": "^3.0.0",
|
||||||
"@vue/cli-plugin-eslint": "^3.0.0",
|
"@vue/cli-plugin-eslint": "^3.0.0",
|
||||||
"@vue/cli-plugin-unit-jest": "^3.0.0",
|
"@vue/cli-plugin-unit-jest": "^3.2.3",
|
||||||
"@vue/cli-service": "^3.0.0",
|
"@vue/cli-service": "^3.0.0",
|
||||||
"@vue/eslint-config-standard": "^3.0.0",
|
"@vue/eslint-config-standard": "^3.0.0",
|
||||||
"@vue/test-utils": "^1.0.0-beta.20",
|
"@vue/test-utils": "^1.0.0-beta.28",
|
||||||
"babel-core": "7.0.0-bridge.0",
|
"babel-core": "7.0.0-bridge.0",
|
||||||
"babel-jest": "^23.0.1",
|
"babel-jest": "^23.0.1",
|
||||||
"lint-staged": "^7.2.0",
|
"lint-staged": "^7.2.0",
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,30 @@
|
||||||
|
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')
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
@ -1 +1 @@
|
||||||
f087314ad07f2b4d7658559be7838c8dd75bf499
|
13dd0eb82ec0a73b25d0a39fe23a367f31a2aaf8
|
||||||
Loading…
Reference in New Issue