Skip to content

Commit 443c0c0

Browse files
remon-nashidalexdriaguine
authored andcommitted
Instruct Jest to load native components from RNW instead of RN (facebook#1201)
1 parent e615a82 commit 443c0c0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

packages/react-scripts/utils/createJestConfig.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ module.exports = (resolve, rootDir, isEjecting) => {
3838
transformIgnorePatterns: [
3939
'[/\\\\]node_modules[/\\\\].+\\.(js|jsx)$'
4040
],
41+
moduleNameMapper: {
42+
'^react-native$': 'react-native-web'
43+
}
4144
};
4245
if (rootDir) {
4346
config.rootDir = rootDir;

0 commit comments

Comments
 (0)