diff --git a/scripts/utils/createJestConfig.js b/scripts/utils/createJestConfig.js index d4ee867f473..3072074807e 100644 --- a/scripts/utils/createJestConfig.js +++ b/scripts/utils/createJestConfig.js @@ -20,6 +20,12 @@ module.exports = (resolve, rootDir) => { resolve('config/polyfills.js') ], setupTestFrameworkScriptFile: resolve('config/jest/environment.js'), + testPathIgnorePatterns: ['/node_modules/', '/build/'], + // Allow three popular conventions: + // **/__tests__/*.js + // **/*.test.js + // **/*.spec.js + testRegex: '(__tests__/.*|\\.(test|spec))\\.js$', testEnvironment: 'node', verbose: true };