diff --git a/components/avatar/__tests__/Avatar.test.js b/components/avatar/__tests__/Avatar.test.js index faceb7f08f..25b837b677 100644 --- a/components/avatar/__tests__/Avatar.test.js +++ b/components/avatar/__tests__/Avatar.test.js @@ -146,4 +146,9 @@ describe('Avatar Render', () => { ); warnSpy.mockRestore(); }); + + it('support size is number', () => { + const wrapper = mount(TestString); + expect(wrapper).toMatchRenderedSnapshot(); + }); }); diff --git a/components/avatar/__tests__/__snapshots__/Avatar.test.js.snap b/components/avatar/__tests__/__snapshots__/Avatar.test.js.snap index 34a6ce2e49..9ed2dad9bc 100644 --- a/components/avatar/__tests__/__snapshots__/Avatar.test.js.snap +++ b/components/avatar/__tests__/__snapshots__/Avatar.test.js.snap @@ -10,3 +10,17 @@ exports[`Avatar Render rtl render component should be rendered correctly in RTL /> `; + +exports[`Avatar Render support size is number 1`] = ` + + + TestString + + +`; diff --git a/components/avatar/__tests__/__snapshots__/demo.test.js.snap b/components/avatar/__tests__/__snapshots__/demo.test.js.snap index 90ae45e569..93892846c9 100644 --- a/components/avatar/__tests__/__snapshots__/demo.test.js.snap +++ b/components/avatar/__tests__/__snapshots__/demo.test.js.snap @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`renders ./components/avatar/demo/badge.md correctly 1`] = ` -
+Array [ @@ -194,7 +194,7 @@ exports[`renders ./components/avatar/demo/badge.md correctly 1`] = ` - + , - -
+ , +] `; exports[`renders ./components/avatar/demo/basic.md correctly 1`] = ` -
+Array [
-
+
,
-
- + , +] `; exports[`renders ./components/avatar/demo/dynamic.md correctly 1`] = ` -
+Array [ U - + , -
+ , +] `; exports[`renders ./components/avatar/demo/toggle-debug.md correctly 1`] = ` -
+Array [ + , + , -
-
+ , +
, +
,
@@ -533,12 +533,12 @@ exports[`renders ./components/avatar/demo/toggle-debug.md correctly 1`] = ` />
-
- + , +] `; exports[`renders ./components/avatar/demo/type.md correctly 1`] = ` -
+Array [ @@ -562,7 +562,7 @@ exports[`renders ./components/avatar/demo/type.md correctly 1`] = ` /> - + , @@ -572,9 +572,10 @@ exports[`renders ./components/avatar/demo/type.md correctly 1`] = ` > U - + , USER - + , - + , U - + , - -
+ , +] `; diff --git a/components/avatar/demo/badge.md b/components/avatar/demo/badge.md index bc344fdd14..a961f8fc4f 100644 --- a/components/avatar/demo/badge.md +++ b/components/avatar/demo/badge.md @@ -18,7 +18,7 @@ import { Avatar, Badge } from 'antd'; import { UserOutlined } from '@ant-design/icons'; ReactDOM.render( -
+ <> } /> @@ -29,7 +29,7 @@ ReactDOM.render( } /> -
, + , mountNode, ); ``` diff --git a/components/avatar/demo/basic.md b/components/avatar/demo/basic.md index 2b0d5c0576..97bcecd468 100644 --- a/components/avatar/demo/basic.md +++ b/components/avatar/demo/basic.md @@ -18,7 +18,7 @@ import { Avatar } from 'antd'; import { UserOutlined } from '@ant-design/icons'; ReactDOM.render( -
+ <>
} /> } /> @@ -31,7 +31,7 @@ ReactDOM.render( } /> } />
-
, + , mountNode, ); ``` diff --git a/components/avatar/demo/dynamic.md b/components/avatar/demo/dynamic.md index f62aee39af..b59aa40093 100644 --- a/components/avatar/demo/dynamic.md +++ b/components/avatar/demo/dynamic.md @@ -29,7 +29,7 @@ const Autoset: React.FC = () => { setColor(index < ColorList.length - 1 ? ColorList[index + 1] : ColorList[0]); }; return ( -
+ <> {user} @@ -40,7 +40,7 @@ const Autoset: React.FC = () => { > Change -
+ ); }; diff --git a/components/avatar/demo/toggle-debug.md b/components/avatar/demo/toggle-debug.md index f9dade4e9a..3dc1866c68 100644 --- a/components/avatar/demo/toggle-debug.md +++ b/components/avatar/demo/toggle-debug.md @@ -41,7 +41,7 @@ const App: React.FC = () => { }; return ( -
+ <> @@ -67,7 +67,7 @@ const App: React.FC = () => {
- + ); }; diff --git a/components/avatar/demo/type.md b/components/avatar/demo/type.md index 7df106b094..2377f1ba01 100644 --- a/components/avatar/demo/type.md +++ b/components/avatar/demo/type.md @@ -18,14 +18,14 @@ import { Avatar } from 'antd'; import { UserOutlined } from '@ant-design/icons'; ReactDOM.render( -
+ <> } /> U - USER + USER U } /> -
, + , mountNode, ); ``` diff --git a/components/comment/__tests__/__snapshots__/demo.test.js.snap b/components/comment/__tests__/__snapshots__/demo.test.js.snap index b221b5c01f..f729c80552 100644 --- a/components/comment/__tests__/__snapshots__/demo.test.js.snap +++ b/components/comment/__tests__/__snapshots__/demo.test.js.snap @@ -122,77 +122,70 @@ exports[`renders ./components/comment/demo/basic.md correctly 1`] = ` `; exports[`renders ./components/comment/demo/editor.md correctly 1`] = ` -
+
-
- - Han Solo - -
+ Han Solo + +
+