mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2025-01-06 12:17:13 +08:00
test(dynamic-input): Add test (#1242)
* test(dynamic-input): Add dynamic-input component test * docs(dynamic-input): Update dynamic-input component test
This commit is contained in:
parent
f8b196f207
commit
f4be21244e
@ -5,4 +5,16 @@ describe('n-dynamic-input', () => {
|
||||
it('should work with import on demand', () => {
|
||||
mount(NDynamicInput)
|
||||
})
|
||||
|
||||
it('should work with `value`', async () => {
|
||||
const wrapper = mount(NDynamicInput, {
|
||||
props: {
|
||||
value: ['aaa']
|
||||
}
|
||||
})
|
||||
|
||||
const inputEl = await wrapper.find('input')
|
||||
expect(inputEl.element.value).toEqual('aaa')
|
||||
expect(wrapper.html()).toContain('data-key="0"')
|
||||
})
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user