Demo ReactNative testing with Detox
- React 17.0.2
- React Native 0.65.1
- NVM
- AppleSimulatorUtils
- XCode 12.5
Create React Native Project
$npx react-native init demo01
$npx react-native start
$npx react-native run-ios
File ios/Podfile
# use_flipper!()
Update pod
$rm -rf ~/Library/Developer/Xcode/DerivedData/*
$cd ios/
$rm -rf Pods
$rm -rf build
$pod install
$npm run ios
Testing with Detox
$npm install -g detox-cli
$npm install detox --save-dev
Initial detox in project
$detox init
Building with Detox
$npm run build-e2e
Run tests with Detox
$npm run test-e2e