-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Jest in Webstorm fails when importing an enum from a lib in the repo #6750
Comments
Same, Angular, not just tests. |
Same here :( |
I have the same problem. |
It is time consuming to figure out the workaround, and a bit awkward to always ensure that working-dir is set to root when running tests from a JetBrains product, so it would be very useful to have this issue fixed |
I'm not 100% sure how this is an nx issue to fix since we cannot control where webstorm looks for a jest config. as a side note, I've not run into this myself as a daily webstorm user which I find odd 🤔 |
Crashed headfirst into this today. An imported enum from a file in the same directory as the test spec fails. I tried some basic things, setting another const equal to the enum in the test itself, nothing worked. I had to put a note in the spec file that this is in fact using so-and-so enum but a bug is preventing the value of that enum from appearing properly. Note that I'm not using Nx. I am however using webstorm. So it would seem this isn't on Nx. |
This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context. |
Current Behavior
Not sure its Nx related **
When running a unit test using Webstorm, it fails when the test includes an import of an enum from a lib in the repo.
However, if I only import an interface / class / type, it does not fail.
When running
yarn test
everything passes successfully even with the enum.I searched for related tickets in ts-jest / babel-jest but couldn't find anything specific.
Expected Behavior
Tests will pass successfully
Steps to Reproduce
https://github.com/FrozenPandaz/nx-examples/tree/enum-jest
Failure Logs
Environment
The text was updated successfully, but these errors were encountered: