-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
Jest.mock does not resolve modules correctly when NODE_PATH is set #1271
Comments
@mzuccala could you please update |
I verified that this indeed happens, but only if you I agree this seems like a big, and I filed it as jestjs/jest#3069. It is highly unlikely that we can do anything about it on our side, so I’ll close this issue. Please feel free to track jestjs/jest#3069 (and maybe even contribute a fix!) |
This was fixed in |
Description
Running tests with
NODE_PATH=src npm test
.Expected behavior
jest.mock('my_module')
should be resolved tosrc/my_module
.Actual behavior
jest.mock('my_module')
does not resolve tosrc/my_module
.Environment
npm ls react-scripts
(if you haven’t ejected):0.8.4
node -v
:v6.9.2
npm -v
:3.10.9
The text was updated successfully, but these errors were encountered: