-
Notifications
You must be signed in to change notification settings - Fork 32
Jest types didn't found #7
Comments
I can confirm that but haven't found the reason until now. Honestly, I ignored the red lines in VSCode because the tests still execute flawlessly. Any help is appreciated! (written on my mobile phone) |
I have a clone of this repo and there, following an issue I can solve it... Also, I see that the jest and typescript configurations need a little tweak, it runs the test that are in the dist folder. That means that the typescript compiler is compiling the test and the test runner is searching for test in the dist folder... |
Thanks for your investigation. Could you make a PR to fix this? |
Sure! |
@dianjuar Did you found out how to include the jest types? The red curled lines in VSCode drive me crazy! 😵 |
Yes I did. I'm not an expert about remove and add the following to the end of the file "exclude": ["node_modules", "dist"],
"typeRoots": ["node_modules/@types"] I think the last one was just typescript tweaking and is not related to this issueI lost the reference of the place were I took the solution but was an specific issue related about the types on the test files without a direct solution. Someone on the comments with lots of reactions said something like ummm, you may have I didn't make the PR because I was not sure about how this works, so though let's wait and see if this comes with a bug or an issue in my project but everything is more than fine, my test has their shiny auto-completion and the rest of the project works like a charm. Maybe you can research more about You can compare your |
as explained in angular-schule/ngx-deploy-starter#7 (comment) by @dianjuar fixes #7
I think the right way to solve this is to have two separate I'm also noticing that at the moment of the build it is taking the test files, if some test file has a type problem the build fails. |
I'm migrating my builder to V11, and I need to do some experiments through TDD, maybe at the end of the integration I have experimented enough to make a PR to solve this |
Already fixed in angular-cli-ghpages. I just need some time to port everything back! 😅 |
When you are writing test, jest types are not found and you miss the auto-completion feature of typescript
To reproduce this bug, just open any test file and see that everything related with jest is not defined
The text was updated successfully, but these errors were encountered: