Skip to content

Add moduleDirectories#126

Open
ManrickCapotolan wants to merge 1 commit into
AnomalyInnovations:masterfrom
ManrickCapotolan:master
Open

Add moduleDirectories#126
ManrickCapotolan wants to merge 1 commit into
AnomalyInnovations:masterfrom
ManrickCapotolan:master

Conversation

@ManrickCapotolan

Copy link
Copy Markdown

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
Copy Markdown
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

jayair commented Aug 13, 2020

Copy link
Copy Markdown
Member

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

@jayair

jayair commented Aug 17, 2020

Copy link
Copy Markdown
Member

@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