-
Notifications
You must be signed in to change notification settings - Fork 455
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
moduleNameMapper doesn't handle multiple paths #1072
Comments
moduleNameMapper is jest configuration itself. I don't think ts-jest did something which changed the default behavior of this config. I'd suggest to check with jest community about your issue. |
Related to jestjs/jest#8461 |
Since jestjs/jest#9465 has been merged and released in jest 25.2.0 and onwards this feature can be implemented in |
hi, thanks for coming back to this. I agree to the approach. Besides, actually @kulshekhar what do you think ? The PR jestjs/jest#8461 was merged in jest 25 so in theory, we should support this feature in
|
I think those who'll start using jest now will start with the latest version and those who are already on v25.x, will likely have a setup that will keep working. It might make sense to start with doing this only for 26.x for now and if there are requests for this feature in 25.x, we add it there. What do you think? |
Sound good to me 👍 |
Issue :
I'm having trouble configuring jest to resolve modules when using multiple
paths
in my tsconfig. It seemsts-jest
will only resolve a single path- is this the case?Expected behavior :
I would expect to find some solution to resolve paths when my
tsconfig.json
paths array has more than one path listed. After all, it is an array ¯_(ツ)_/¯File structure is as follows
relevant parts of
tsconfig.json
jest.config.js
Debug log:
log file content
Minimal repo :
Unfortunately Codesandbox doesn't support
tsconfig.json
paths :(The text was updated successfully, but these errors were encountered: