From 189bedcfa99b42d6c3e35be38647a4f9f1cfcd37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABl=20Nison?= Date: Fri, 18 Jan 2019 12:47:20 +0000 Subject: [PATCH] Stops calling existsSync on object configs (#7607) --- CHANGELOG.md | 1 + packages/jest-config/src/index.js | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 801c7b197d3b..02fac518934b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -52,6 +52,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') &&