react-native-material-ripple
react-native-material-ripple copied to clipboard
Cannot read property nativeEvent of undefined while testing with JEST and react-testing-library
This is my component:
I try to simulate on press while testing using react testing library and this is the error I get:
Please let me know how I can test the on-press event. Any help is appreciated.
Same issue here!
Any solution ? @Prernabudh
@faizazafar @Prernabudh you guys can try
const item = await findByTestId("switch");
fireEvent(item, 'onChange', {nativeEvent: {}}));
for react native