-
Notifications
You must be signed in to change notification settings - Fork 306
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
Could not locate module ./create_spy #69
Comments
I had the same issue when I upgraded to jest package.json"jest": {
...
"moduleNameMapper": null,
...
} |
Just released v3.0.0 which finally includes this patch: #53. Please note this https://github.com/thymikee/jest-preset-angular#absolute-imports |
@thymikee It is still failing to me.
What can I do if I have modules like ionic that I have to transform? It does not get the module path correctly and it maps to the app directory instead of node_modules folder. My
I tested it with Jest v20 and everything was good. |
@jesusbotella these are 2 unrelated things. Can you point me to a repro case? "moduleNameMapper": {
"^app\/(.*)": "<rootDir>/src/app/$1"
}, and in code: import sth from 'app/sth'; |
@jesusbotella Maybe you should try this:
|
I am using 4.0.1 already and it is not working |
@tom10271 remove your node_modules and install again. |
It works after removing Thanks |
Hello,
I'm trying to test my Ionic app using jest, and I'm getting this error when executing jest command.
The error I see is:
The package.json jest config that I have is:
The setup file that I created has the same content as the one in the README.
And my test file is:
I think that my test file is not the thing which fails, because I tried to comment the whole file out and it kept failing. I also tried to apply the modified moduleNameMapper config in the README, and nothing happened.
The project does not fully match the Angular CLI structure, as it comes from Ionic, but the route I see in the error (
/Users/jesus/Development/app/src/./create_spy
) looks weird.It may be something on my side but I don't see what it could be.
Thank you!
The text was updated successfully, but these errors were encountered: