Note: this is forked from babel-jest
v21.2.0 modified to use babel core version 7.
npm install --save-dev babel7-jest
To explicitly define babel7-jest
as a transformer for your JavaScript code, map .js files to the babel-jest
module.
"jest": {
"transform": {
"^.+\\.jsx?$": "babel7-jest"
}
},
If you would like to write your own preprocessor, uninstall and delete babel-jest and set the config.transform option to your preprocessor.