Skip to content
This is how you should test your react-native components with Jest and React Native Testing Library
TypeScript Java Ruby Objective-C JavaScript Starlark
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
__tests__
android
ios
src
.buckconfig
.eslintrc.js
.gitattributes
.gitignore
.prettierrc
.watchmanconfig
App.tsx
README.md
app.json
babel.config.js
index.js
jest.config.js
jest.setup.js
metro.config.js
package-lock.json
package.json
tsconfig.json
yarn.lock

README.md

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.
You can’t perform that action at this time.