diff --git a/packages/react-scripts/config/jest/babelTransform.js b/packages/react-scripts/config/jest/babelTransform.js index bee55b1b156..48856f07174 100644 --- a/packages/react-scripts/config/jest/babelTransform.js +++ b/packages/react-scripts/config/jest/babelTransform.js @@ -9,8 +9,15 @@ 'use strict'; const babelJest = require('babel-jest'); +const getCustomConfig = require('../custom-react-scripts/config'); + +//Get custom configuration for injecting plugins, presets and loaders +const customConfig = getCustomConfig(true); module.exports = babelJest.createTransformer({ - presets: [require.resolve('babel-preset-react-app')], + presets: [require.resolve('babel-preset-react-app')].concat( + customConfig.babelPresets + ), babelrc: false, + plugins: customConfig.babelPlugins, });