Skip to content
This repository has been archived by the owner on Nov 11, 2024. It is now read-only.

Commit

Permalink
Make Jest transform @react-native-community packages by default (#24294)
Browse files Browse the repository at this point in the history
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: facebook/react-native#24294

Differential Revision: D14748962

Pulled By: cpojer

fbshipit-source-id: 36300ee021f03b8c13275a6e0cf28d988ee5beba
  • Loading branch information
thymikee authored and aleclarson committed Nov 15, 2019
1 parent c0beb86 commit 968dc62
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion jest-preset.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ module.exports = {
),
},
transformIgnorePatterns: [
'node_modules/(?!(jest-)?react-native|react-clone-referenced-element)',
'node_modules/(?!(jest-)?react-native|@react-native-community|react-clone-referenced-element)',
],
setupFiles: [require.resolve('./jest/setup.js')],
testEnvironment: 'node',
Expand Down

0 comments on commit 968dc62

Please sign in to comment.