From f7171b9905c4a38d85562f03c51c1d7e0bff2824 Mon Sep 17 00:00:00 2001 From: Tamas Lakatos Date: Sat, 3 Mar 2018 09:38:08 +0100 Subject: [PATCH] Add rootDir to runtime FileNotFound error message (#5693) (#5702) --- CHANGELOG.md | 2 ++ packages/jest-config/src/utils.js | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 43854874a7c1..091499af1e48 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,8 @@ ([#5558](https://github.com/facebook/jest/pull/5558)) * `[jest-matcher-utils]` Add `isNot` option to `matcherHint` function ([#5512](https://github.com/facebook/jest/pull/5512)) +* `[jest-config]` Add `` to runtime files not found error report + ([#5693](https://github.com/facebook/jest/pull/5693)) * `[expect]` Make toThrow matcher pass only if Error object is returned from promises ([#5670](https://github.com/facebook/jest/pull/5670)) * `[expect]` Add isError to utils diff --git a/packages/jest-config/src/utils.js b/packages/jest-config/src/utils.js index 6e3533009e01..8831b25c0233 100644 --- a/packages/jest-config/src/utils.js +++ b/packages/jest-config/src/utils.js @@ -40,7 +40,8 @@ export const resolve = (rootDir: string, key: string, filePath: Path) => { throw createValidationError( ` Module ${chalk.bold(filePath)} in the ${chalk.bold( key, - )} option was not found.`, + )} option was not found. + ${chalk.bold('')} is: ${rootDir}`, ); }