Skip to content

This is how you should test your react-native components with Jest and React Native Testing Library

License

Notifications You must be signed in to change notification settings

vanGalilea/react-native-testing

Repository files navigation

banner

No More Hacks and Headaches | Learn How to Test Your Components Before Your Users Will

Covered Examples 🎞

Tools in use 🛠️

Setup and requirements 📋

How to run the tests 🏃‍♀️

  • 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

How to run the app 📱

  • 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 or a to run it on Android emulator

Ideas and future improvements 🚀

  • ⚛️ Add tests for react native web project

Inspiration, resources and further reading 📚

app-in-e2e-testing-gif

About

This is how you should test your react-native components with Jest and React Native Testing Library

Resources

License

Stars

Watchers

Forks

Packages

No packages published