mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2025-04-12 14:40:47 +08:00
test(countdown): optimize test (#4087)
This commit is contained in:
parent
0c1dea5d55
commit
ab06939390
@ -13,6 +13,7 @@ describe('n-countdown', () => {
|
||||
}
|
||||
})
|
||||
expect(wrapper.text()).toBe('02:00:00')
|
||||
wrapper.unmount()
|
||||
})
|
||||
it('should work with `precision`&`active` prop`', async () => {
|
||||
const wrapper = mount(NCountdown, {
|
||||
@ -30,6 +31,7 @@ describe('n-countdown', () => {
|
||||
expect(wrapper.text()).toBe('02:00:00.000')
|
||||
await wrapper.setProps({ active: true })
|
||||
expect(wrapper.text()).not.toBe('02:00:00.000')
|
||||
wrapper.unmount()
|
||||
})
|
||||
it('should work with `render` prop', () => {
|
||||
const render: CountdownProps['render'] = ({
|
||||
@ -46,6 +48,7 @@ describe('n-countdown', () => {
|
||||
}
|
||||
})
|
||||
expect(wrapper.text()).not.toBe('1:1:1:1')
|
||||
wrapper.unmount()
|
||||
})
|
||||
it('should work with `on-finish` prop', async () => {
|
||||
const onFinish = jest.fn()
|
||||
|
Loading…
x
Reference in New Issue
Block a user