import React from 'react'; import { render } from '@testing-library/react-native'; import { Fieldset, Text } from '../..'; describe('
', () => { it('should render children', () => { const { getByTestId } = render( , ); expect(getByTestId('fieldset')).toHaveTextContent('Banana dance'); }); it('should render custom styles', () => { const style = { backgroundColor: 'teal' }; const { getByTestId } = render( , ); expect(getByTestId('fieldset')).toHaveStyle(style); }); describe('prop: label', () => { it('should render label', () => { const { getByText } = render(); expect(getByText('Something:')).toBeTruthy(); }); }); describe('prop: labelStyle', () => { it('should render custom label styles', () => { const style = { backgroundColor: 'teal' }; const { getByText } = render( , ); expect(getByText('Something:')).toHaveStyle(style); }); }); });