From 85bad6c1693da14979eee771ee3671e5d7c7ae79 Mon Sep 17 00:00:00 2001 From: kooriookami <38392315+kooriookami@users.noreply.github.com> Date: Thu, 31 Dec 2020 15:55:51 +0800 Subject: [PATCH] test(select): add select modelValue prop type test (#1173) * fix(select): fix select type missing array * fix(select): add select test --- packages/select/__tests__/select.spec.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/select/__tests__/select.spec.ts b/packages/select/__tests__/select.spec.ts index a42d9cd6ba..bb32ce1128 100644 --- a/packages/select/__tests__/select.spec.ts +++ b/packages/select/__tests__/select.spec.ts @@ -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) })