diff --git a/CHANGELOG.md b/CHANGELOG.md index 06ae8b1d68ba..1c43f045ca10 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -50,6 +50,7 @@ ### Fixes +- `[jest-config]` Ensure `existsSync` is only called with a string parameter ([#7607](https://github.com/facebook/jest/pull/7607)) - `[expect]` `toStrictEqual` considers sparseness of arrays. ([#7591](https://github.com/facebook/jest/pull/7591)) - `[jest-cli]` Fix empty coverage data for untested files ([#7388](https://github.com/facebook/jest/pull/7388)) - `[jest-cli]` [**BREAKING**] Do not use `text-summary` coverage reporter by default if other reporters are configured ([#7058](https://github.com/facebook/jest/pull/7058)) diff --git a/packages/jest-config/src/index.js b/packages/jest-config/src/index.js index 7502ea6ffb51..16affb204add 100644 --- a/packages/jest-config/src/index.js +++ b/packages/jest-config/src/index.js @@ -286,6 +286,7 @@ export function readConfigs( .filter(root => { // Ignore globbed files that cannot be `require`d. if ( + typeof root === 'string' && fs.existsSync(root) && !fs.lstatSync(root).isDirectory() && !root.endsWith('.js') &&