Skip to content

Commit d21b7da

Browse files
authored
Allow popular test path conventions (#400)
1 parent b16f6c4 commit d21b7da

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

scripts/utils/createJestConfig.js

+6
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@ module.exports = (resolve, rootDir) => {
2020
resolve('config/polyfills.js')
2121
],
2222
setupTestFrameworkScriptFile: resolve('config/jest/environment.js'),
23+
testPathIgnorePatterns: ['<rootDir>/node_modules/', '<rootDir>/build/'],
24+
// Allow three popular conventions:
25+
// **/__tests__/*.js
26+
// **/*.test.js
27+
// **/*.spec.js
28+
testRegex: '(__tests__/.*|\\.(test|spec))\\.js$',
2329
testEnvironment: 'node',
2430
verbose: true
2531
};

0 commit comments

Comments
 (0)