- 👆 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.
- Clone the repo
- Run
yarn
to install dependencies - Run
yarn test:unit
to run the unit tests - Run
yarn test:unit:dev
to run the unit tests in dev/watch mode - Run
yarn test:unit:coverage
to run the tests and generate a coverage report - Run
yarn test:e2e
to run the e2e tests - Run
yarn test:e2e:dev
to run the e2e tests in dev/watch mode - Run
yarn test:e2e:record
to run the e2e tests and record a video of the tests
- Clone the repo
- Run
yarn
to install dependencies - Run
npx pod-install
to install iOS dependencies - Run
yarn start
to start the metro bundler - Click
i
to run the app on iOS simulator ora
to run it on Android emulator
- ⚛️ Add tests for react native web project
- 📑 A blog by Steve Galili on "Where and How to Start Testing Your React Native App"
- 👏 Inspired by Kent C. Dodds' workshop Test React Components with Jest and React Testing Library. For more info check Epic React.
- 📕 React Native Testing Library
- 🧑🔬️ Jest
- ️⚛️ React Native
- 🗺 React Navigation
- 🛰 MSW