test(select): add select modelValue prop type test (#1173)

* fix(select): fix select type missing array

* fix(select): add select test
This commit is contained in:
kooriookami
2020-12-31 15:55:51 +08:00
committed by GitHub
parent cc8f825715
commit 85bad6c169

View File

@@ -206,13 +206,16 @@ describe('Select', () => {
const options = getOptions()
const vm = wrapper.vm as any
expect(vm.value).toBe('')
expect(wrapper.find('.el-input__inner').element.value).toBe('')
options[2].click()
await nextTick()
expect(vm.value).toBe('选项3')
expect(wrapper.find('.el-input__inner').element.value).toBe('蚵仔煎')
expect(vm.count).toBe(1)
await nextTick()
options[4].click()
await nextTick()
expect(vm.value).toBe('选项5')
expect(wrapper.find('.el-input__inner').element.value).toBe('北京烤鸭')
expect(vm.count).toBe(2)
})