- ๐ 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