This is how you should test your react-native components with Jest and React Native Testing Library
In this repo you'll find several examples that will cover: - 👆 Clicking buttons and asserting onPress' outcome. - 📲 Filling a simple login form and asserting successful submission. - 🎣 Custom hook testing (number of alternatives). - 📡 Mocking fetch calls. - 🧭 Mocking navigation through screens. (react navigation v5) - 🔚 E2E feel due to real navigation throughout screens. - 📥 Handling and mocking providers. - 📹 Mocking external lib.'s components. - 🎭 Mocking and interacting with RN's Modal component. - 🧾 Handling with a screen with RN's FlatList component. - 📡 Using MSW to mock api calls and handling loading/errors.