Skip to content

Make Jest transform @react-native-community packages by default#24294

Closed
thymikee wants to merge 1 commit into
react:masterfrom
thymikee:feat/jest-preset-community
Closed

Make Jest transform @react-native-community packages by default#24294
thymikee wants to merge 1 commit into
react:masterfrom
thymikee:feat/jest-preset-community

Conversation

@thymikee

@thymikee thymikee commented Apr 3, 2019

Copy link
Copy Markdown
Contributor

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.

Changelog

[General] [Added] - make Jest transform @react-native-community/ packages by default

Test Plan

Check the regex: regexr.com/4bird

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Apr 3, 2019
@thymikee thymikee changed the title feat: allow Jest to transform @react-native-community/ packages by default Make Jest transform @react-native-community/ packages by default Apr 3, 2019
@thymikee thymikee changed the title Make Jest transform @react-native-community/ packages by default Make Jest transform @react-native-community packages by default Apr 3, 2019

@cpojer cpojer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Thanks for this fix.

@facebook-github-bot facebook-github-bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cpojer is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@react-native-bot

Copy link
Copy Markdown
Collaborator

This pull request was successfully merged by @thymikee in 7e23c7c.

When will my fix make it into a release? | Upcoming Releases

@react-native-bot react-native-bot added the Merged This PR has been merged. label Apr 3, 2019
grabbou pushed a commit that referenced this pull request Apr 8, 2019
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
aleclarson pushed a commit to alloc/react-native-macos that referenced this pull request Nov 15, 2019
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: react/react-native#24294

Differential Revision: D14748962

Pulled By: cpojer

fbshipit-source-id: 36300ee021f03b8c13275a6e0cf28d988ee5beba
facebook-github-bot pushed a commit that referenced this pull request Apr 14, 2022
Summary:
This sync includes the following changes:
- **[8dcedba](react/react@8dcedba15 )**: Add fallback shim for AbortController ([#24285](react/react#24285)) //<Ricky>//
- **[b86baa1](react/react@b86baa1cb )**: Add back lost cache test ([#24317](react/react#24317)) //<Ricky>//
- **[bafe912](react/react@bafe912a5 )**: update types for InputContinuousLane and DefaultLane ([#24316](react/react#24316)) //<Leo>//
- **[4ebaeae](react/react@4ebaeae40 )**: moved mutation code to passive ([#24251](react/react#24251)) //<Luna Ruan>//
- **[caa60e8](react/react@caa60e8fc )**: update types for NonIdleLanes and IdleLane ([#24313](react/react#24313)) //<Leo>//
- **[1f7a901](react/react@1f7a901d7 )**: Fix false positive lint error with large number of branches  ([#24287](react/react#24287)) //<Stephen Cyron>//
- **[f56dfe9](react/react@f56dfe950 )**: Warn on setState() in useInsertionEffect() ([#24298](react/react#24298)) //<dan>//
- **[d68b09d](react/react@d68b09def )**: Fix warning about setState in useEffect ([#24295](react/react#24295)) //<dan>//
- **[0579154](react/react@057915477 )**: Update create-subscription README ([#24294](react/react#24294)) //<dan>//

Changelog:
[General][Changed] - React Native sync for revisions e8f4a66...8dcedba

jest_e2e[run_all_tests]

Reviewed By: kacieb

Differential Revision: D35581147

fbshipit-source-id: 33661d77eb000fdedab7e506a458fc739eab0056
Saadnajmi pushed a commit to Saadnajmi/react-native-macos that referenced this pull request Jan 15, 2023
Summary:
This sync includes the following changes:
- **[8dcedba](react/react@8dcedba15 )**: Add fallback shim for AbortController ([react#24285](react/react#24285)) //<Ricky>//
- **[b86baa1](react/react@b86baa1cb )**: Add back lost cache test ([react#24317](react/react#24317)) //<Ricky>//
- **[bafe912](react/react@bafe912a5 )**: update types for InputContinuousLane and DefaultLane ([react#24316](react/react#24316)) //<Leo>//
- **[4ebaeae](react/react@4ebaeae40 )**: moved mutation code to passive ([react#24251](react/react#24251)) //<Luna Ruan>//
- **[caa60e8](react/react@caa60e8fc )**: update types for NonIdleLanes and IdleLane ([react#24313](react/react#24313)) //<Leo>//
- **[1f7a901](react/react@1f7a901d7 )**: Fix false positive lint error with large number of branches  ([react#24287](react/react#24287)) //<Stephen Cyron>//
- **[f56dfe9](react/react@f56dfe950 )**: Warn on setState() in useInsertionEffect() ([react#24298](react/react#24298)) //<dan>//
- **[d68b09d](react/react@d68b09def )**: Fix warning about setState in useEffect ([react#24295](react/react#24295)) //<dan>//
- **[0579154](react/react@057915477 )**: Update create-subscription README ([react#24294](react/react#24294)) //<dan>//

Changelog:
[General][Changed] - React Native sync for revisions e8f4a66...8dcedba

jest_e2e[run_all_tests]

Reviewed By: kacieb

Differential Revision: D35581147

fbshipit-source-id: 33661d77eb000fdedab7e506a458fc739eab0056
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged This PR has been merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants