You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Set BUILD_EXCLUDE_BABEL_REGISTER: true under Jest tests (facebook#42690)
Summary:
Pull Request resolved: facebook#42690
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
fbshipit-source-id: 1f0a20315c96edaf79054e29a80c7a9561e5b352
0 commit comments