From e5bd6338bb74b5fb0d34c7c5322b3482961a1338 Mon Sep 17 00:00:00 2001 From: mguay22 Date: Thu, 25 Jul 2019 12:46:33 -0400 Subject: [PATCH] [#369] Update docs to include react-native-config-node --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index da51004..a9ea764 100644 --- a/README.md +++ b/README.md @@ -218,6 +218,8 @@ When Proguard is enabled (which it is by default for Android release builds), it ## Testing +Since `react-native-config` contains native code, it cannot be run in a node.js environment (Jest, Mocha). [react-native-config-node](https://github.com/CureApp/react-native-config-node) provides a way to mock `react-native-config` for use in test runners - exactly as it is used in the actual app. + ### Jest For mocking the `Config.FOO_BAR` usage, create a mock at `__mocks__/react-native-config.js`: