import React from 'react'; import { render } from '@testing-library/react-native'; import { Badge } from '../Badge'; describe('Badge', () => { it('should render with text', () => { const { getByText } = render(Test Badge); expect(getByText('Test Badge')).toBeTruthy(); }); it('should render default variant', () => { const { getByText } = render(Default); expect(getByText('Default')).toBeTruthy(); }); it('should render success variant', () => { const { getByText } = render(Success); expect(getByText('Success')).toBeTruthy(); }); it('should render error variant', () => { const { getByText } = render(Error); expect(getByText('Error')).toBeTruthy(); }); it('should render warning variant', () => { const { getByText } = render(Warning); expect(getByText('Warning')).toBeTruthy(); }); it('should render info variant', () => { const { getByText } = render(Info); expect(getByText('Info')).toBeTruthy(); }); it('should render small size', () => { const { getByText } = render(Small); expect(getByText('Small')).toBeTruthy(); }); it('should render medium size', () => { const { getByText } = render(Medium); expect(getByText('Medium')).toBeTruthy(); }); it('should render large size', () => { const { getByText } = render(Large); expect(getByText('Large')).toBeTruthy(); }); it('should apply custom styles', () => { const customStyle = { margin: 10 }; const { getByText } = render(Styled); expect(getByText('Styled')).toBeTruthy(); }); it('should handle testID prop', () => { const { getByTestId } = render(Test); expect(getByTestId('badge')).toBeTruthy(); }); it('should render with number', () => { const { getByText } = render({99}); expect(getByText('99')).toBeTruthy(); }); it('should render with icon', () => { const { getByTestId } = render( Inner Badge ); expect(getByTestId('badge')).toBeTruthy(); }); });