diff --git a/components/space/__tests__/__snapshots__/index.test.js.snap b/components/space/__tests__/__snapshots__/index.test.js.snap index 8f9caee7d..a4534d909 100644 --- a/components/space/__tests__/__snapshots__/index.test.js.snap +++ b/components/space/__tests__/__snapshots__/index.test.js.snap @@ -1,10 +1,10 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`Space should render correct with children 1`] = ` -
-
text1
+
+
text1
-
text1
+
text1
text3
diff --git a/components/space/__tests__/index.test.js b/components/space/__tests__/index.test.js index baac0e043..3d69b8660 100644 --- a/components/space/__tests__/index.test.js +++ b/components/space/__tests__/index.test.js @@ -25,8 +25,8 @@ describe('Space', () => { ); }, }); - expect(wrapper.find('.ant-space').element.style.columnGap).toBe('10px'); - expect(wrapper.find('.ant-space').element.style.rowGap).toBe('10px'); + expect(wrapper.findAll('.ant-space-item')[0].element.style.marginRight).toBe('10px'); + expect(wrapper.findAll('.ant-space-item')[1].element.style.marginRight).toBe(''); }); it('should render vertical space width customize size', () => { @@ -40,8 +40,8 @@ describe('Space', () => { ); }, }); - expect(wrapper.find('.ant-space').element.style.columnGap).toBe('10px'); - expect(wrapper.find('.ant-space').element.style.rowGap).toBe('10px'); + expect(wrapper.findAll('.ant-space-item')[0].element.style.marginBottom).toBe('10px'); + expect(wrapper.findAll('.ant-space-item')[1].element.style.marginBottom).toBe(''); }); it('should render correct with children', () => {