diff --git a/components/radio/__tests__/__snapshots__/group.test.tsx.snap b/components/radio/__tests__/__snapshots__/group.test.tsx.snap index 8869eb1..48a20db 100644 --- a/components/radio/__tests__/__snapshots__/group.test.tsx.snap +++ b/components/radio/__tests__/__snapshots__/group.test.tsx.snap @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`Radio Group should render correctly 1`] = ` -"
" +`; + +exports[`Radio Group should work correctly with different sizes 1`] = ` +"
" `; exports[`Radio should support react-node in description 1`] = ` -"
" +`; + +exports[`Radio should work correctly with different sizes 1`] = ` +"
" `; diff --git a/components/radio/__tests__/group.test.tsx b/components/radio/__tests__/group.test.tsx index 8febedb..9cb15c5 100644 --- a/components/radio/__tests__/group.test.tsx +++ b/components/radio/__tests__/group.test.tsx @@ -21,6 +21,24 @@ describe('Radio Group', () => { expect(() => wrapper.unmount()).not.toThrow() }) + it('should work correctly with different sizes', () => { + const wrapper = mount( +
+ + 1 + + + 1 + + + 1 + +
, + ) + expect(wrapper.html()).toMatchSnapshot() + expect(() => wrapper.unmount()).not.toThrow() + }) + it('should trigger events in group', () => { let value = '' const changeHandler = jest.fn().mockImplementation(val => (value = val)) diff --git a/components/radio/__tests__/index.test.tsx b/components/radio/__tests__/index.test.tsx index 535c8f8..9ab0375 100644 --- a/components/radio/__tests__/index.test.tsx +++ b/components/radio/__tests__/index.test.tsx @@ -10,6 +10,19 @@ describe('Radio', () => { expect(() => wrapper.unmount()).not.toThrow() }) + it('should work correctly with different sizes', () => { + const wrapper = mount( +
+ mini + small + medium + large +
, + ) + expect(wrapper.html()).toMatchSnapshot() + expect(() => wrapper.unmount()).not.toThrow() + }) + it('should render correctly with checked prop', () => { const wrapper = mount(Option) wrapper.setProps({ checked: false })