Skip to content

Commit

Permalink
docs: update readme with jest mock instructions
Browse files Browse the repository at this point in the history
jesperjohansson committed Apr 20, 2022

Verified

This commit was signed with the committer’s verified signature.
jesperjohansson Jesper Johansson
1 parent 275fb00 commit 96631c6
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -61,6 +61,14 @@ function App() {
}
```

## Mock module in Jest

Import `react-native-is-detox/jestSetup` in your Jest setup file.

```js
import 'react-native-is-detox/jestSetup';
```

## Credits

Original solution by [Simon Buchan](https://stackoverflow.com/users/20135/simon-buchan) from [this comment](https://stackoverflow.com/a/50166137/6886817).

0 comments on commit 96631c6

Please sign in to comment.