Skip to content

Instantly share code, notes, and snippets.

@Noitidart
Forked from haibert/DetoxExpo.js
Created February 27, 2022 18:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Noitidart/81545adde2ff3494766810a3c60ec40e to your computer and use it in GitHub Desktop.
Save Noitidart/81545adde2ff3494766810a3c60ec40e to your computer and use it in GitHub Desktop.
1. yarn add --dev detox jest-circus
2. detox init -r jest (This creates the e2e folder along with the .detoxrc.json)
3. yarn add --dev eslint-plugin-detox (optional)
plugins: [...'detox'...],
- Add this to your eslint config plugins
4.Make sure your your **eas.json** has a simulator build set up that looks like this then create a simulator release build by running: **eas build --profile simulator --platform ios**
"simulator": {
"ios": {
"simulator": true,
"developmentClient": false
}
}
6. Create a folder called bin inside the e2e folder and drop the unzipped **YourApp.app** file into it
7. Inside the **.detoxrc.json** set the binaryPath to your simulator build
"apps": {
"ios": {
"type": "ios.app",
"binaryPath": "e2e/bin/YourApp.app"
},
Write some tests and run it using
detox test -c ios
Enjoy!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment