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
Copy file name to clipboardExpand all lines: docs/GettingStarted.md
+17-13Lines changed: 17 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -87,26 +87,15 @@ To use [Babel](http://babeljs.io/), install the `babel-jest` and `@babel/core` p
87
87
yarn add --dev babel-jest @babel/core
88
88
```
89
89
90
-
Don't forget to add a [`babel.config.js`](https://babeljs.io/docs/en/config-files) file in your project's root folder. For example, if you are using ES6 and [React.js](https://reactjs.org) with the [`@babel/preset-env`](https://babeljs.io/docs/en/babel-preset-env) and [`@babel/preset-react`](https://babeljs.io/docs/en/babel-preset-react) presets:
90
+
Don't forget to add a [`babel.config.js`](https://babeljs.io/docs/en/config-files) file in your project's root folder. For example, if you are using ES2018 and [React](https://reactjs.org) with the [`@babel/preset-env`](https://babeljs.io/docs/en/babel-preset-env) and [`@babel/preset-react`](https://babeljs.io/docs/en/babel-preset-react) presets:
You are now set up to use all ES2018 features and React-specific syntax.
110
99
111
100
> Note: `babel-jest` is automatically installed when installing Jest and will automatically transform files if a babel configuration exists in your project. To avoid this behavior, you can explicitly reset the `transform` configuration option:
112
101
@@ -119,6 +108,21 @@ You are now set up to use all ES6 features and React specific syntax.
119
108
}
120
109
```
121
110
111
+
#### Babel 6
112
+
113
+
Jest 24 dropped support for Babel 6. We highly recommend you to upgrade to Babel 7, which is actively maintained. However, if you cannot upgrade to Babel 7, either keep using Jest 23 or upgrade to Jest 24 with `babel-jest` locked at version 23, like in the example below:
114
+
115
+
```
116
+
"dependencies": {
117
+
"babel-core": "^6.26.3",
118
+
"babel-jest": "^23.6.0",
119
+
"babel-preset-env": "^1.7.0",
120
+
"jest": "^24.0.0"
121
+
}
122
+
```
123
+
124
+
While we generally recommend using the same version of every Jest package, this workaround will allow you to continue using the latest version of Jest with Babel 6 for now.
125
+
122
126
### Using webpack
123
127
124
128
Jest can be used in projects that use [webpack](https://webpack.github.io/) to manage assets, styles, and compilation. webpack does offer some unique challenges over other tools. Refer to the [webpack guide](Webpack.md) to get started.
0 commit comments