Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(jest-expo): support passing caller to babel-jest (#27637)
# Why If the project babel config is babel-preset-expo then it should have access to the target platform that the bundler is transforming for. In this case, the bundler is Jest, so we need to supply the platform caller option to babel jest to ensure platform-specific transforms can be applied in a predictable way. # Test Plan - I added a test for the new behavior to ensure `process.env.EXPO_OS` is available in tests that use `babel-preset-expo`. Hopefully all other tests continue to pass as expected. - It's unclear if we should also pass `isDev` to the caller as well. It seems like we currently support users toggling this at runtime in tests. - Ran `et cp -a --no-build --no-lint --no-uniformity-check` to ensure all tests keep working. # Checklist <!-- Please check the appropriate items below if they apply to your diff. This is required for changes to Expo modules. --> - [ ] Documentation is up to date to reflect these changes (eg: https://docs.expo.dev and README.md). - [ ] Conforms with the [Documentation Writing Style Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md) - [ ] This diff will work correctly for `npx expo prebuild` & EAS Build (eg: updated a module plugin). --------- Co-authored-by: Expo Bot <34669131+expo-bot@users.noreply.github.com>
- Loading branch information
1 parent
e6a4183
commit 08acd18
Showing
4 changed files
with
57 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters