Skip to content

Instantly share code, notes, and snippets.

@haibert
Last active February 28, 2022 18:47
Show Gist options
  • Save haibert/301d30cfe697688ccdbb5cd53c49c018 to your computer and use it in GitHub Desktop.
Save haibert/301d30cfe697688ccdbb5cd53c49c018 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