Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Silent fail in package.json configuration error #3531

Closed
cgood92 opened this issue May 9, 2017 · 2 comments
Closed

Silent fail in package.json configuration error #3531

cgood92 opened this issue May 9, 2017 · 2 comments

Comments

@cgood92
Copy link

cgood92 commented May 9, 2017

I spent a lot of time trying to figure out why my configuration for moduleNameMapper was not working. At the end of the day, the issue was simply that I had a mis-spelling in the path name. But, I'm curious as to why Jest did not report that as an error? It would have made my job so much easier if this had not been a "silent fail".

Here is what I did:

// package.json
"moduleNameMapper": {
    "someRegex": "<rootDir>/some/incorrect/path.js"
}

Result: Jest continued to run all tests, as normal. Nothing was different if I took this bit of code out. It was the same either way.

Ideal result:
A console error saying: "/some/incorrect/path.js does not exist. Please provide a correct path."

@thymikee
Copy link
Collaborator

This is a duplicate of (quite a long standing!) issue: #1888.

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants