diff --git a/packages/react-scripts/scripts/utils/createJestConfig.js b/packages/react-scripts/scripts/utils/createJestConfig.js index 4300c7e480..f57fc91b4d 100644 --- a/packages/react-scripts/scripts/utils/createJestConfig.js +++ b/packages/react-scripts/scripts/utils/createJestConfig.js @@ -33,7 +33,7 @@ module.exports = (resolve, rootDir, isEjecting) => { setupFilesAfterEnv: setupTestsFile ? [setupTestsFile] : [], testMatch: [ '/src/**/__tests__/**/*.{js,jsx,ts,tsx}', - '/src/**/?(*.)(spec|test).{js,jsx,ts,tsx}', + '/src/**/*.{spec,test}.{js,jsx,ts,tsx}', ], testEnvironment: 'jest-environment-jsdom-fourteen', transform: {