import React from 'react'; import { View } from 'react-native'; import { fireEvent, render } from '@testing-library/react-native'; import Button from '.'; const onPressMock = jest.fn(); const testProps = { title: 'Press me!', type: 'primary', onPress: onPressMock, testID: 'testButton', initialText: 'Initial text', textAfterPress: 'Button pressed!' }; const TestButton = ({ loading = false, disabled = false }) => (