import React from 'react'; import { Text } from 'react-native'; import { fireEvent, render, renderHook } from '@testing-library/react-native'; import { useTheme } from '../../../theme'; import { getThemedStyles } from '../styles'; import Button from '../Button'; const labelText = 'A pressable button'; const Title = () => {labelText}; describe('Button', () => { it('renders as expected with a string passed as children', () => { const { toJSON, getByRole, getByText } = render( ); expect(getByRole('button')).toBeDefined(); expect(getByText(labelText)).toBeDefined(); expect(toJSON()).toMatchSnapshot(); }); it('renders as expected with a component passed as children', () => { const { toJSON, getByRole, getByText } = render(