Skip to content

[0.87] Fix helloworld Jest preset after react-native/jest-preset subpath removal#57539

Merged
zeyap merged 1 commit into
0.87-stablefrom
fix-helloworld-jest-preset-0.87
Jul 14, 2026
Merged

[0.87] Fix helloworld Jest preset after react-native/jest-preset subpath removal#57539
zeyap merged 1 commit into
0.87-stablefrom
fix-helloworld-jest-preset-0.87

Conversation

@zeyap

@zeyap zeyap commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Changelog

[Internal] - Fix helloworld Jest preset on 0.87-stable

Summary

#57481 (landed via #57508) removed the react-native/jest-preset subpath redirect, but the in-repo private/helloworld template still referenced preset: 'react-native', which Jest resolves to the now-deleted react-native/jest-preset.js.

This broke all test_ios_helloworld* jobs on 0.87-stable at the yarn test step (e.g. run 29279033977):

● Validation Error:
  Module react-native should have "jest-preset.js" or "jest-preset.json" file at the root.

Since private/helloworld is excluded from the yarn workspace ("!private/helloworld") and installed standalone, it also needs @react-native/jest-preset as an explicit devDependency for the preset to resolve.

Changes

  • Point private/helloworld/jest.config.js preset at @react-native/jest-preset.
  • Add @react-native/jest-preset to private/helloworld devDependencies.

This mirrors the shipped community template and the current CLI-generated scaffold.

Test Plan

CI: test_ios_helloworld* jobs pass (previously failing at yarn test).

…oval

Summary:
#57481 removed the `react-native/jest-preset` subpath redirect, but the
in-repo `private/helloworld` template still referenced `preset: 'react-native'`,
which Jest resolves to the now-deleted `react-native/jest-preset.js`. This broke
all `test_ios_helloworld*` CI jobs on 0.87-stable at the `yarn test` step:

  Validation Error: Module react-native should have "jest-preset.js" or
  "jest-preset.json" file at the root.

Since `private/helloworld` is excluded from the yarn workspace and installed
standalone, it also needs `@react-native/jest-preset` as an explicit
devDependency for the preset to resolve.

- Point jest.config.js preset at `@react-native/jest-preset`.
- Add `@react-native/jest-preset` to devDependencies.

Changelog: [Internal]

Test Plan:
CI: `test_ios_helloworld*` jobs pass (previously failing at `yarn test`).
@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 Jul 14, 2026

@huntie huntie left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks!

@github-actions

Copy link
Copy Markdown

Caution

Missing Changelog

Please add a Changelog to your PR description. See Changelog format

@zeyap zeyap merged commit d7288bd into 0.87-stable Jul 14, 2026
54 of 56 checks passed
@zeyap zeyap deleted the fix-helloworld-jest-preset-0.87 branch July 14, 2026 09:52
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: Facebook Partner: Facebook Partner Pick Request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants