From 98a8c1b01dccfe3fa6dbd6a3b64f96b4960dffe7 Mon Sep 17 00:00:00 2001 From: XieZongChen <46394163+amadeus711@users.noreply.github.com> Date: Mon, 1 Nov 2021 01:49:12 -0500 Subject: [PATCH] test(input): update test (#1494) --- src/input/tests/Input.spec.tsx | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/input/tests/Input.spec.tsx b/src/input/tests/Input.spec.tsx index ac02e2bb1..a05a143fc 100644 --- a/src/input/tests/Input.spec.tsx +++ b/src/input/tests/Input.spec.tsx @@ -199,10 +199,19 @@ describe('n-input', () => { it('should work with `prefix` slots', async () => { const wrapper = mount(NInput, { - slots: { prefix: '#' } + slots: { prefix: '¥' } }) expect(wrapper.find('.n-input__prefix').exists()).toBe(true) - expect(wrapper.find('.n-input__prefix').text()).toBe('#') + expect(wrapper.find('.n-input__prefix').text()).toBe('¥') + wrapper.unmount() + }) + + it('should work with `suffix` slots', async () => { + const wrapper = mount(NInput, { + slots: { suffix: '元' } + }) + expect(wrapper.find('.n-input__suffix').exists()).toBe(true) + expect(wrapper.find('.n-input__suffix').text()).toBe('元') wrapper.unmount() }) })