Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
fix: add console error to catch block
  • Loading branch information
Jonathon Dickson committed Jul 10, 2018
commit b47ff106cb9a98beb3c953913aa753aa3421daaf
4 changes: 3 additions & 1 deletion packages/jest-resolve-dependencies/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ class DependencyResolver {
}
try {
return this._resolver.resolveModule(file, dependency, options);
} catch (e) {}
} catch (e) {
console.error(e);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure why we fallback to mock module here... I think a better approach would be to just rethrow the error unless we want to fetch the mock.

}
return this._resolver.getMockModule(file, dependency);
})
.filter(Boolean);
Expand Down