-
-
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
Testing with Jest and Webpack aliases #1909
Comments
I suspect it's because you have a You probably need a second case like (your mileage may vary, this is an educated guess) |
I want |
Webpack does not use regex like Jest, you must make the changes explained above. |
Can jest-webpack-alias, Jest/Webpack docs work in my problem ? |
I'm going to close this since it isn't very actionable by us. You can see jestjs/jest#1723 for more details. Please try the changes mentioned above. |
when I use
create-react-app
my webpack aliases is
and my jest config is
import module like this
when I use
npm run start
, I can run my project correctly.But, when I use
npm run test
, it throw an error I can not find the module which i import in the last picture .How can I solve this ?
The text was updated successfully, but these errors were encountered: