Skip to content

Commit 4ca80a3

Browse files
fsonrandycoulman
authored andcommitted
Upgrade Jest to 17.0 (facebook#1078)
* Replace `scriptPreprocessor` config with `transform`. * Also remove `moduleFileExtensions` which has been redundant since 16.0 (`['js', 'json', 'jsx', 'node’]` is the default)
1 parent e4a8ba2 commit 4ca80a3

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

Diff for: packages/react-scripts/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"autoprefixer": "6.5.1",
2727
"babel-core": "6.17.0",
2828
"babel-eslint": "7.0.0",
29-
"babel-jest": "16.0.0",
29+
"babel-jest": "17.0.2",
3030
"babel-loader": "6.2.7",
3131
"babel-preset-latest": "^6.16.0",
3232
"babel-preset-react": "^6.16.0",
@@ -53,7 +53,7 @@
5353
"html-webpack-plugin": "2.24.0",
5454
"http-proxy-middleware": "0.17.2",
5555
"identity-obj-proxy": "^3.0.0",
56-
"jest": "16.0.2",
56+
"jest": "17.0.2",
5757
"json-loader": "0.5.4",
5858
"node-sass": "^3.13.0",
5959
"object-assign": "4.1.0",

Diff for: packages/react-scripts/utils/createJestConfig.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@ module.exports = (resolve, rootDir, isEjecting) => {
3838
if (!isEjecting) {
3939
// This is unnecessary after ejecting because Jest
4040
// will just use .babelrc in the project folder.
41-
config.scriptPreprocessor = resolve('config/jest/transform.js');
41+
config.transform = {
42+
'^.+\\.(js|jsx)$': resolve('config/jest/transform.js'),
43+
};
4244
}
4345
return config;
4446
};

0 commit comments

Comments
 (0)