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

Add moduleDirectories #126

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ManrickCapotolan
Copy link

in package.json we just need to add this config:

"jest": {
    "moduleDirectories": [
      "node_modules",
      "src"
    ]
  }

so we can do absolute imports on unit tests too.

@ManrickCapotolan
Copy link
Author

hello @jayair can you help me merge this PR please? this is to support absolute imports for typescript unit tests. (no need for aliases) thank you!

@jayair
Copy link
Member

jayair commented Aug 13, 2020

@ManrickCapotolan Thanks for this. I'll have a look this weekend!

@jayair
Copy link
Member

jayair commented Aug 17, 2020

@ManrickCapotolan This looks good. Can I ask for a test case? I think you can pretty much copy this one:

https://github.com/AnomalyInnovations/serverless-bundle/tree/master/tests/aliases-jest

Let me know if you need some help.

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

Successfully merging this pull request may close these issues.

2 participants