From 96631c6c1f424e1e9cd777979003d8b478021388 Mon Sep 17 00:00:00 2001 From: Jesper Johansson Date: Wed, 20 Apr 2022 10:37:08 +0200 Subject: [PATCH] docs: update readme with jest mock instructions --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index da4a99e..0b0f14f 100644 --- a/README.md +++ b/README.md @@ -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).