This is how you should test
🧪 your react-native ⚛️ components with Jest and React Native Testing Library
👏 Inspired by Kent C. Dodds' workshop Test React Components with Jest and React Testing Library. For more info check Epic React
In this repo you'll find several examples that will cover:
👆Clicking buttons and asserting onPress' outcome. 📲Filling a simple login form and asserting succesful submission. 🎣Custom hook testing (number of alternatives). 📡Mocking fetch calls. 🧭Mocking navigation through screens. (react navigation v5) 📥Handling and mocking providers.