[Regression] Jest no longer works out of the box #20683
Labels
Impact: Regression
Describes a behavior that used to work on a prior release, but stopped working recently.
Resolution: Locked
This issue was locked by the bot.
🔩Test Infrastructure
Test infrastructure and continuous integration.
Environment
Description
After upgrading to React Native v0.56.0,
jest
no longer works.It is missing a
babel-core
bridge and the@babel/core
dependency.Once these are added, previously working tests no longer work if the source contains code that requires transpilation.
To confirm, my tests ran fine under v0.55.4 - after the upgrade, they started to fail. I was able to reproduce a minimal demo using
react-native init
Reproducible Demo
Edit: I've created a repo that has the project set up the exact same with 0.55.4 and 0.56.0.
react-native init <any name>
react-native-vector-icons
(the same issue also happens withreact-native-pie-chart
, but only one is required)yarn add react-native-vector-icons && yarn react-native link react-native-vector-icons
App.js
, addimport Icon from 'react-native-vector-icons/MaterialIcons';
echo "import App from './App';" > App.test.js
yarn test
This will result in an error due to incorrect
babel
versions:This one is pretty easily resolved with
yarn add -D [email protected]
.Running the
yarn test
again will result in the following errors:The text was updated successfully, but these errors were encountered: