I have some problems with testing TextInput
changes in react-native with jest and enzyme.
My component that handles user input basi
I was able to do this using react-native-testing-library.
// ...
import { render, act, fireEvent } from 'react-native-testing-library'
// ...
it ('does stuff', () => {
const mock = jest.fn()
const component = render()
fireEvent.changeText(component.findByType(TextInput), 'test')
expect(mock).toHaveBeenCalledWith('test')
})