Skip to content

Add a custom Jest resolver to opt out from handling "exports" in tests #51307

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

j-piasecki
Copy link
Contributor

@j-piasecki j-piasecki commented May 14, 2025

Summary: D72228547 added the exports field to the main react-native package, in which all imports from ./src/* are explicitly disallowed. This was expected to be a breaking change and to limit the surface area of it, this diff will allow using all imports in jest tests.

Changelog: [General][Added] Added a custom Jest resolver to opt out from handling "exports" in tests

Differential Revision: D74708701

@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 May 14, 2025
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D74708701

j-piasecki added a commit to j-piasecki/react-native that referenced this pull request May 14, 2025
facebook#51307)

Summary:

Changelog: [General][Added] Added a custom Jest resolver to opt out from handling "exports" in tests

Reviewed By: huntie

Differential Revision: D74708701
j-piasecki added a commit to j-piasecki/react-native that referenced this pull request May 14, 2025
facebook#51307)

Summary:

D72228547 added the `exports` field to the main `react-native` package, in which all imports from `./src/*` are explicitly disallowed. This was expected to be a breaking change and to limit the surface area of it, this diff will allow using all imports in jest tests.

Changelog: [General][Added] Added a custom Jest resolver to opt out from handling "exports" in tests

Reviewed By: huntie

Differential Revision: D74708701
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D74708701

facebook#51307)

Summary:
Pull Request resolved: facebook#51307

D72228547 added the `exports` field to the main `react-native` package, in which all imports from `./src/*` are explicitly disallowed. This was expected to be a breaking change and to limit the surface area of it, this diff will allow using all imports in jest tests.

Changelog: [General][Added] Added a custom Jest resolver to opt out from handling "exports" in tests

Reviewed By: huntie

Differential Revision: D74708701
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D74708701

@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label May 14, 2025
@facebook-github-bot
Copy link
Contributor

This pull request has been merged in ee9bd85.

@react-native-bot
Copy link
Collaborator

This pull request was successfully merged by @j-piasecki in ee9bd85

When will my fix make it into a release? | How to file a pick request?

react-native-bot pushed a commit that referenced this pull request May 19, 2025
#51307)

Summary:
Pull Request resolved: #51307

D72228547 added the `exports` field to the main `react-native` package, in which all imports from `./src/*` are explicitly disallowed. This was expected to be a breaking change and to limit the surface area of it, this diff will allow using all imports in jest tests.

Changelog: [General][Added] Added a custom Jest resolver to opt out from handling "exports" in tests

Reviewed By: huntie

Differential Revision: D74708701

fbshipit-source-id: 9a2714f4e6f78ffbad9e56b5bb92657c9ea908ef
@react-native-bot
Copy link
Collaborator

This pull request was successfully merged by @j-piasecki in 7749879

When will my fix make it into a release? | How to file a pick request?

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. fb-exported Merged This PR has been merged. p: Facebook Partner: Facebook p: Software Mansion Partner: Software Mansion Partner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants