This repository has been archived by the owner on Nov 11, 2024. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: use
require.resolve
in jest-preset
(#22972)
Summary: The current way the Jest preset work requires the different files to be in `<rootDir>/node_modules/react-native`. This is not necessarily true - especially in monorepoes. If we instead do `require.resolve`, we do not need to do `rootDir` replacement in Jest. Having a JS file as preset has been supported since Jest 23.0.0: jestjs/jest#6185 Changelog: ---------- [General] [Fixed] - use `require.resolve` in `jest-preset` Pull Request resolved: facebook/react-native#22972 Differential Revision: D13662758 Pulled By: hramos fbshipit-source-id: ca79b5b89d9d05c6fe639b0d88619858e8d05da7
- Loading branch information