From b47ff106cb9a98beb3c953913aa753aa3421daaf Mon Sep 17 00:00:00 2001 From: Jonathon Dickson Date: Tue, 10 Jul 2018 09:38:07 +0100 Subject: [PATCH 1/2] fix: add console error to catch block --- packages/jest-resolve-dependencies/src/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/jest-resolve-dependencies/src/index.js b/packages/jest-resolve-dependencies/src/index.js index d36c59d69688..04bf55ccae32 100644 --- a/packages/jest-resolve-dependencies/src/index.js +++ b/packages/jest-resolve-dependencies/src/index.js @@ -47,7 +47,9 @@ class DependencyResolver { } try { return this._resolver.resolveModule(file, dependency, options); - } catch (e) {} + } catch (e) { + console.error(e); + } return this._resolver.getMockModule(file, dependency); }) .filter(Boolean); From 2c07aa71f6a11903e7e2e0514e60764579299ccb Mon Sep 17 00:00:00 2001 From: Jonathon Dickson Date: Tue, 10 Jul 2018 10:13:44 +0100 Subject: [PATCH 2/2] add changelog entry --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 502e6930fad9..986e8897a62a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ### Fixes +- `[jest-resolve]` Add console error for when an error is caught ([#6665](https://github.com/facebook/jest/pull/6665)) - `[jest-runner]` Force parallel runs for watch mode, to avoid TTY freeze ([#6647](https://github.com/facebook/jest/pull/6647)) - `[jest-cli]` properly reprint resolver errors in watch mode ([#6407](https://github.com/facebook/jest/pull/6407)) - `[jest-cli]` Write configuration to stdout when the option was explicitly passed to Jest ([#6447](https://github.com/facebook/jest/pull/6447))