From 443c0c0e155a91535c97579c428ec466493b0eed Mon Sep 17 00:00:00 2001 From: mustang Date: Wed, 7 Dec 2016 16:40:18 -0800 Subject: [PATCH] Instruct Jest to load native components from RNW instead of RN (#1201) --- packages/react-scripts/utils/createJestConfig.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/react-scripts/utils/createJestConfig.js b/packages/react-scripts/utils/createJestConfig.js index 162ec918278..36550ccb9bd 100644 --- a/packages/react-scripts/utils/createJestConfig.js +++ b/packages/react-scripts/utils/createJestConfig.js @@ -38,6 +38,9 @@ module.exports = (resolve, rootDir, isEjecting) => { transformIgnorePatterns: [ '[/\\\\]node_modules[/\\\\].+\\.(js|jsx)$' ], + moduleNameMapper: { + '^react-native$': 'react-native-web' + } }; if (rootDir) { config.rootDir = rootDir;