diff --git a/packages/react-scripts/package.json b/packages/react-scripts/package.json index 14f6309c160..743091ee1ef 100644 --- a/packages/react-scripts/package.json +++ b/packages/react-scripts/package.json @@ -26,7 +26,7 @@ "autoprefixer": "6.5.1", "babel-core": "6.17.0", "babel-eslint": "7.0.0", - "babel-jest": "16.0.0", + "babel-jest": "17.0.2", "babel-loader": "6.2.7", "babel-preset-latest": "^6.16.0", "babel-preset-react": "^6.16.0", @@ -53,7 +53,7 @@ "html-webpack-plugin": "2.24.0", "http-proxy-middleware": "0.17.2", "identity-obj-proxy": "^3.0.0", - "jest": "16.0.2", + "jest": "17.0.2", "json-loader": "0.5.4", "node-sass": "^3.13.0", "object-assign": "4.1.0", diff --git a/packages/react-scripts/utils/createJestConfig.js b/packages/react-scripts/utils/createJestConfig.js index 1ef135c0ce7..8b514952178 100644 --- a/packages/react-scripts/utils/createJestConfig.js +++ b/packages/react-scripts/utils/createJestConfig.js @@ -38,7 +38,9 @@ module.exports = (resolve, rootDir, isEjecting) => { if (!isEjecting) { // This is unnecessary after ejecting because Jest // will just use .babelrc in the project folder. - config.scriptPreprocessor = resolve('config/jest/transform.js'); + config.transform = { + '^.+\\.(js|jsx)$': resolve('config/jest/transform.js'), + }; } return config; };