forked from wix/Detox
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Usage with Expo instructions (wix#630)
* expo 25 instructions * Update Guide.Expo.md * Update Guide.Expo.md * Update Guide.Expo.md * Update Guide.Expo.md * Update Guide.Expo.md * Update Guide.Expo.md * Update Guide.Expo.md
- Loading branch information
Showing
2 changed files
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
--- | ||
id: Guide.Expo | ||
title: Expo | ||
--- | ||
|
||
## Usage with Expo (iOS) | ||
|
||
- Install `detox` and `detox-expo-helpers` (yarn or npm) | ||
- Add `detox` configuration to [package.json](https://github.com/expo/with-detox-tests/blob/master/package.json#L21-L29): | ||
|
||
```es6 | ||
"detox": { | ||
"configurations": { | ||
"ios.sim": { | ||
"binaryPath": "bin/Exponent.app", | ||
"type": "ios.simulator", | ||
"name": "iPhone 7" | ||
} | ||
} | ||
} | ||
``` | ||
|
||
- Download the Expo app from [Expo.io/tools](https://expo.io/tools). | ||
- Unzip the iOS IPA and **rename the folder** to `Exponent.app`. It'll have a file icon but will still be a folder. | ||
- Create `bin` folder and put `Exponent.app` inside so it matches the binaryPath set above. | ||
- Create an `e2e` and copy over the settings from [the example app](https://github.com/expo/with-detox-tests/tree/master/e2e) | ||
|
||
The most important piece of this the `reloadApp` from `detox-expo-helpers`. Don't forget this. | ||
|
||
```es6 | ||
const { reloadApp } = require('detox-expo-helpers'); | ||
// ... | ||
beforeEach(async () => { | ||
await reloadApp(); | ||
}); | ||
``` | ||
|
||
## Usage with Expo (Android) | ||
|
||
- Usage with Android is currently TBD. | ||
|
||
### Example App | ||
[expo/with-detox-tests](https://github.com/expo/with-detox-tests) |