Commit 2f83490
committed
Fix helloworld Jest preset after react-native/jest-preset subpath removal
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`).1 parent d6baa43 commit 2f83490
2 files changed
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
0 commit comments