Browse Source

test: update datepicker test

pull/398/head
tangjinzhou 6 years ago
parent
commit
05deb537f6
  1. 10
      components/date-picker/__tests__/showTime.test.js

10
components/date-picker/__tests__/showTime.test.js

@ -1,5 +1,6 @@
import { mount } from '@vue/test-utils'
import { asyncExpect } from '@/tests/utils'
import moment from 'moment'
import DatePicker from '../'
const { RangePicker } = DatePicker
@ -34,7 +35,14 @@ describe('DatePicker with showTime', () => {
const onChangeFn = jest.fn()
const wrapper = mount({
render () {
return <DatePicker showTime open onChange={onChangeFn} onOk={onOkFn} onOpenChange={onOpenChangeFn} />
return <DatePicker
showTime
open
onChange={onChangeFn}
onOk={onOkFn}
onOpenChange={onOpenChangeFn}
defaultValue={moment()}
/>
},
}, { sync: false })

Loading…
Cancel
Save