Skip to content
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

refactor(tests): add path to module mapper for jest tests #532

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

abouroubi
Copy link

@abouroubi abouroubi commented Nov 30, 2020

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

With NestCLI we can now use the path option of tsconfig to add path resolution, and have it included in the generated build.
Unfortunately this does not work with jest.

[ ] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[x] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Other... Please describe:

What is the current behavior?

When we add a new path to tsconfig, and use this new path in imports, jest can't resolve the modules.

What is the new behavior?

Jest can now resolve modules imported using the path config from tsconfig file

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants