Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update instructions for Exponent.app 2.x compatibility #7

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

Utilities for using [detox](http://github.com/wix/detox) in your Expo/Create React Native App apps.

## Dependencies
`detox-expo-helpers` requires your app to use the Expo SDK 29.0.0 or greater.

## Use it

### Install it
Expand All @@ -16,6 +19,17 @@ npm i detox-expo-helpers --save-dev

Follow the steps in the detox [Getting Started](https://github.com/wix/detox/blob/master/docs/Introduction.GettingStarted.md) guide.

In your `init.js` file, set the `global.__E2E__` flag to `true` before your tests begin, like so:
```js
beforeAll(async () => {
global.__E2E__ = true
await detox.init(config)
})
```

This will tell the Expo client to run in a mode compatible with E2E testing.


### Download the Expo app to some directory in your project and configure in package.json

You can download the Expo app from the [Expo Tools page](https://expo.io/tools). See an [example package.json configuration](https://github.com/expo/with-detox-tests/blob/033020b165452d641f512a9b1a8a291632ce8e8f/package.json#L21-L29)
Expand Down