test(date-picker): optimize test (#4138)

This commit is contained in:
XieZongChen 2022-12-05 11:51:44 +08:00 committed by GitHub
parent 2131cdc037
commit 673f081f30
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -151,6 +151,7 @@ describe('n-date-picker', () => {
inputReadonly: true
})
expect(wrapper.find('input').attributes('readonly')).toBe('')
wrapper.unmount()
})
it('should work with `clearable` prop', async () => {
@ -210,6 +211,7 @@ describe('n-date-picker', () => {
locale: dateEnUS.locale
})
)
wrapper.unmount()
})
it('should work with `firstDayOfWeek` prop', async () => {
@ -290,6 +292,7 @@ describe('n-date-picker', () => {
expect(wrapper.text().includes('07akioni')).toBe(true)
await wrapper.setProps({ separator: '08akioni', type: 'datetimerange' })
expect(wrapper.text().includes('08akioni')).toBe(true)
wrapper.unmount()
})
it('should work with `status` prop', async () => {