-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Potential issue with Jest with moduleNameMapper #4524
Comments
Obviously, this is user error, but the accidental omission of '/' caused a serious headache. If this isn't a bug, at least this issue could be referred to help anyone else in similar situation. |
I got this issue too in version 21. But in version 20, the error was displayed as expected. |
Not sure if related, but I get |
I also just ran into this error after upgrading to Jest 21. It was similarly an issue where one of my moduleNameMappers pointed to a non-existant file. |
I can confirm this is happening to me as well, but from what I can tell, my |
I have the same problem but it's a bit more than an inconvenience... |
same issue here, my setup: "moduleNameMapper": {
"@app/(.*)": "<rootDir>/src/$1"
} This works fine when I run |
I'm seeing the same behavior as @Mohamed3on mentioned. I am using Jest 23.1.0. What's odd is that if you kill and rerun the command it'll eventually start working immediately. |
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. |
Do you want to request a feature or report a bug?
bug
What is the current behavior?
moduleNameMapper
to map a certain character as an alias (in my case I used@
)jest
with--watch
flag,import
the wrong file by forgetting the/
in@/myModule
, i.e.@myModule
Determining test suites to run...
until you kill the process.If the current behavior is a bug, please provide the steps to reproduce and either a repl.it demo through https://repl.it/languages/jest or a minimal repository on GitHub that we can
yarn install
andyarn test
.What is the expected behavior?
Cannot find module
error messagePlease provide your exact Jest configuration and mention your Jest, node, yarn/npm version and operating system.
The text was updated successfully, but these errors were encountered: