mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2025-03-07 13:48:31 +08:00
test(input): update test (#1483)
This commit is contained in:
parent
636e6dcfbf
commit
f1fd51e0ed
@ -83,6 +83,15 @@ describe('n-input', () => {
|
||||
wrapper.unmount()
|
||||
})
|
||||
|
||||
it('should work with `rows` prop', async () => {
|
||||
const wrapper = mount(NInput, { props: { type: 'textarea' } })
|
||||
expect(wrapper.find('textarea').attributes('rows')).toBe('3')
|
||||
|
||||
await wrapper.setProps({ type: 'textarea', rows: 5 })
|
||||
expect(wrapper.find('textarea').attributes('rows')).toBe('5')
|
||||
wrapper.unmount()
|
||||
})
|
||||
|
||||
it('should work with `size` prop', async () => {
|
||||
;(['small', 'medium', 'large'] as const).forEach((size) => {
|
||||
const wrapper = mount(NInput, { props: { size: size } })
|
||||
|
Loading…
Reference in New Issue
Block a user