mirror of
https://gitee.com/ant-design-vue/ant-design-vue.git
synced 2024-12-16 01:41:15 +08:00
25 lines
691 B
JavaScript
25 lines
691 B
JavaScript
import { mount } from '@vue/test-utils'
|
|
import { asyncExpect } from '@/tests/utils'
|
|
import VcTimePicker from '../../vc-time-picker/TimePicker'
|
|
import TimePicker from '..'
|
|
import focusTest from '../../../tests/shared/focusTest'
|
|
|
|
describe('TimePicker', () => {
|
|
focusTest(TimePicker)
|
|
|
|
it('renders addon correctly', () => {
|
|
const wrapper = mount({
|
|
render () {
|
|
return <TimePicker addon={() => (<button>Ok</button>)} />
|
|
},
|
|
})
|
|
const vcTimePicker = wrapper.find({ name: VcTimePicker.name })
|
|
const addonWrapper = mount({
|
|
render () {
|
|
return vcTimePicker.vm.$slots.addon[0]
|
|
},
|
|
})
|
|
expect(addonWrapper.html()).toMatchSnapshot()
|
|
})
|
|
})
|