-
Notifications
You must be signed in to change notification settings - Fork 309
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
Webpack require() assets #41
Comments
Hard to tell without a repo where the problem happens. Are you able to provide such? Otherwise there's little I can do |
In your Angular CLI project example if you attempt to I will attempt to fork your repo to show later tonight. |
Can you send a PR with failing test which we can fix later? |
Closed
thymikee
added a commit
that referenced
this issue
Sep 6, 2017
In #6 we introduced very loose moduleNameMapper which resulted in couple of weird bugs and until next Jest release it's impossible to override it. This PR reverts it and adds some reasonable defaults. Also, because of this "(.*)"mapping, while debugging #41 on master version of Jest, I encountered an issue where one of the internal Jest modules was calling path matching the regexp, but couldn't find it under src dir. This surfaced only because Jest version on master supports checking if modules in moduleNameMapper exist and throws otherwise.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Looks like this issue has been answered several times on the internet but nothing seems to work for me.
The approach I tried was to redirect the require to a mock, as suggested by the Jest Webpack documentation
This approach seems to work for the majority of users, but for some reason isn't for me. I understand all setups are a little different, but I'm wondering if anyone has ran into this issue while running the preset, and how they solved it.
The text was updated successfully, but these errors were encountered: