Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set BUILD_EXCLUDE_BABEL_REGISTER: true under Jest tests
Summary: Issues triggered by `InspectorProxy*` tests under `packages/dev-middleware` (T169943794) can be root-caused to `dev-middleware` performing Babel registration within a test run, after Jest has hooked its own transformer. Babel registration is only required when running this code (`dev-middleware`, etc) directly from source - we already have the `BUILD_EXCLUDE_BABEL_REGISTER` mechanism to strip it out from production builds, but we currently don't prevent registration under tests, where Jest's transformer should be allowed to do its work. This adds the same `babel-plugin-transform-define` mechanism that we use for production builds to the Jest transformer. Changelog: [Internal] Prevent inadvertent Babel registration during running of repo tests Reviewed By: huntie Differential Revision: D53125777
- Loading branch information