This is my jest configuration from the package.json file:
\"jest\": {
\"automock\": false,
\"browser\": true,
\"moduleNameMapper\": {
\"\\\
Each yearly preset only compiles what was ratified in that year. babel-preset-env replaces
es2015,es2016,es2017,latest
Based on this, on latest configurations you must use/replace your Plugins/Preset of es2015 and any esX to the new one: env.
babel-preset-env with npm install..babelrc you should update accordingly:{
"presets": [
"env",
"stage-0",
"react-native"
],
"plugins": ...
}
More information on Babel plugins official Documentation.
☝️ Remember the order of the plugins/preset in the array is important.