Skip to content

Conversation

@kitten
Copy link
Contributor

@kitten kitten commented Jan 14, 2026

Summary:

This implements the proposal to split the Jest preset (and dependencies) out into a separate package: react-native-community/discussions-and-proposals#926

  • react-native has an optional peer dependency on @react-native/jest-preset
  • react-native/jest-preset.js throws when @react-native/jest-preset isn't installed and instructs the user to add it to migrate
  • @react-native/jest-preset may be used directly as a Jest preset

Changelog:

[GENERAL] [BREAKING] - Move Jest preset to new @react-native/jest-preset package

Test Plan:

The jest preset is used, with some modifications, in facebook/react-native itself and CI should confirm that the changes work. Running jest on the repo similarly validates that the preset still works.

Otherwise, nothing has changed and the easiest way to test this is to use the preset in an existing project and try both preset set to the current value and preset set to "@react-native/jest-preset"

@meta-cla meta-cla 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 Jan 14, 2026
@facebook-github-bot facebook-github-bot added p: Expo Partner: Expo Partner Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. labels Jan 14, 2026
@@ -0,0 +1,39 @@
# @react-native/jest-preset
Copy link
Member

Choose a reason for hiding this comment

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

Thanks for this great README ❤️

Copy link
Member

@huntie huntie left a comment

Choose a reason for hiding this comment

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

quick nit: Can we use packages/jest-preset/ as the dir name? (I appreciate we aren't consistently one way or the other yet!)

@huntie huntie self-assigned this Jan 14, 2026
@kitten kitten force-pushed the @kitten/refactor/jest-preset-splitout branch from 00ce567 to 58b7292 Compare January 15, 2026 12:00
@kitten kitten force-pushed the @kitten/refactor/jest-preset-splitout branch from 58b7292 to 456d33e Compare January 15, 2026 12:05
@kitten kitten force-pushed the @kitten/refactor/jest-preset-splitout branch from c3f6b97 to c835025 Compare January 15, 2026 12:18
@kitten kitten requested a review from huntie January 15, 2026 12:25
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. p: Expo Partner: Expo Partner Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants