Skip to content

anchetaWern/RNTesting

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RNTesting

A sample React Native app showing how to implement snapshot and end-to-end testing with Jest and Detox.

Full tutorial is available at: http://blog.pusher.com/react-native-testing/

Note: the React Native code in this repo may be a little bit outdated and won't run immediately after you've followed the setup instructions. Be sure to refactor the code to use the more recent React Native syntax if it doesn't run for you.

Prerequisites

  • React Native development environment (Android Studio or Xcode)
  • Yarn
  • Detox prerequisites installed (detox-cli, applesimutils for iOS)
  • Android emulator/Genymotion virtual device (for Android), iOS simulator

Getting Started

  1. Clone the repo:
git clone https://github.com/anchetaWern/RNTesting.git
  1. Install the dependencies:
cd RNTesting
yarn install
react-native eject
  1. Run the tests:
yarn test
detox build -c android.emu.debug # or detox build -c ios.sim.debug
detox test -c android.emu.debug # or detox test -c ios.sim.debug

Built With

Donation

If this project helped you reduce time to develop, please consider buying me a cup of coffee :)

Buy Me A Coffee

About

A sample React Native project showing how to setup tests with Jest and Detox

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published