Skip to content

Commit 17292c9

Browse files
thymikeegrabbou
authored andcommitted
Make Jest transform @react-native-community packages by default (#24294)
Summary: Currently, `react-native` Jest preset will not automatically transpile extracted Lean Core modules (all under `react-native-community` org), so maintainers will likely need to update their docs on how to do that (it's a common pain in RN testing story). We can make it easier for users and maintainers by adding RNC modules to the `transformIgnorePatterns` whitelist we have in Jest preset. Some of them are not necessary to transpile, but I'd say it's a small sacrifice to make (having first test run possibly slower) for having less friction around migrating to extracted modules. [General] [Added] - make Jest transform react-native-community/ packages by default Pull Request resolved: #24294 Differential Revision: D14748962 Pulled By: cpojer fbshipit-source-id: 36300ee021f03b8c13275a6e0cf28d988ee5beba
1 parent dc25f20 commit 17292c9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

jest-preset.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ module.exports = {
2828
'./jest/assetFileTransformer.js',
2929
),
3030
},
31-
transformIgnorePatterns: ['node_modules/(?!(jest-)?react-native)'],
31+
transformIgnorePatterns: [
32+
'node_modules/(?!(jest-)?react-native|@react-native-community)',
33+
],
3234
setupFiles: [require.resolve('./jest/setup.js')],
3335
testEnvironment: 'node',
3436
};

0 commit comments

Comments
 (0)