Skip to content

Commit f8bfd1a

Browse files
rogeliogTimer
authored andcommitted
Update to Jest 19 (facebook#1614)
* Upgrade to Jest 19 * Use testMatch * Correct version
1 parent a06e532 commit f8bfd1a

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"autoprefixer": "6.7.7",
2727
"babel-core": "6.23.1",
2828
"babel-eslint": "7.1.1",
29-
"babel-jest": "18.0.0",
29+
"babel-jest": "19.0.0",
3030
"babel-loader": "7.0.0",
3131
"babel-preset-react-app": "^2.1.1",
3232
"babel-runtime": "^6.20.0",
@@ -49,7 +49,7 @@
4949
"html-webpack-plugin": "2.28.0",
5050
"http-proxy-middleware": "0.17.3",
5151
"inquirer": "3.0.6",
52-
"jest": "18.1.0",
52+
"jest": "19.0.2",
5353
"object-assign": "4.1.1",
5454
"postcss-loader": "1.3.3",
5555
"promise": "7.1.1",

scripts/utils/createJestConfig.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ module.exports = (resolve, rootDir, isEjecting) => {
2525
collectCoverageFrom: ['src/**/*.{js,jsx}'],
2626
setupFiles: [resolve('config/polyfills.js')],
2727
setupTestFrameworkScriptFile: setupTestsFile,
28-
testPathIgnorePatterns: [
28+
testMatch: [
2929
// Ignore the following directories:
3030
// build
3131
// - the build output directory
@@ -37,7 +37,8 @@ module.exports = (resolve, rootDir, isEjecting) => {
3737
// - ignore tests in dependencies
3838
// scripts
3939
// - directory generated upon eject
40-
'<rootDir>[/\\\\](build|\\.cache|docs|node_modules|scripts)[/\\\\]',
40+
'<rootDir>/!(build|docs|node_modules|scripts)/**/__tests__/**/*.js?(x)',
41+
'<rootDir>/!(build|docs|node_modules|scripts)/**/?(*.)(spec|test).js?(x)',
4142
],
4243
testEnvironment: 'node',
4344
testURL: 'http://localhost',

0 commit comments

Comments
 (0)