From e8b4d032659d54f2c53b55f95cf60b06d3598a16 Mon Sep 17 00:00:00 2001 From: xrkffgg Date: Mon, 12 Apr 2021 11:20:57 +0800 Subject: [PATCH] test: add more space test (#30099) --- .../__tests__/__snapshots__/index.test.js.snap | 2 ++ components/space/__tests__/index.test.js | 13 +++++++++++++ 2 files changed, 15 insertions(+) diff --git a/components/space/__tests__/__snapshots__/index.test.js.snap b/components/space/__tests__/__snapshots__/index.test.js.snap index 6fce03e681..b198af5d43 100644 --- a/components/space/__tests__/__snapshots__/index.test.js.snap +++ b/components/space/__tests__/__snapshots__/index.test.js.snap @@ -1,5 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP +exports[`Space rtl render component should be rendered correctly in RTL direction 1`] = `null`; + exports[`Space should render correct with children 1`] = `
{ mountTest(Space); + rtlTest(Space); it('should render width empty children', () => { const wrapper = mount(); @@ -47,6 +49,17 @@ describe('Space', () => { expect(wrapper.find('div.ant-space-item').at(1).prop('style').marginRight).toBeUndefined(); }); + it('should render width size 0', () => { + const wrapper = mount( + + 1 + 2 + , + ); + + expect(wrapper.find('div.ant-space-item').at(0).prop('style').marginRight).toBe(0); + }); + it('should render vertical space width customize size', () => { const wrapper = mount(