-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Regression: Jest 26 spec tests - runner process never stops after test exception #3973
Comments
I can confirm that by adding Example: However - this "extra" flag was not required before 10.3.0 @nrwl team: Please could you let us know your thoughts on this issue..? As this adds complications to the testing DX. |
|
Agree with @ubergeoff We are experiencing this same issue for a while in our project with 100+ libraries and it is really doing our lives a bit more miserable. Not just the real error is hidden, but also the tests will continue running forever, what leads to many builds hanging until the Jenkins job times out and gets killed. |
Hi there @FrozenPandaz - any thoughts on the above issues..? |
I believe that's related to jestjs/jest#10577 |
@FrozenPandaz Related Jest issue has been closed, does it make sense to check and pin to the latest Jest? |
If the Jest fix is part of the 26 release, you should just be able to update the workspace version of Jest and that's it. If something related to Nx doesn't work (like not being to run |
Just an update: I updated to latest Jest dependencies:
The test runner process still does not stop. i.e. Process does not end when error is found. Still getting:
|
FYI if it is down to that same jest issue you linked to above (jestjs/jest#10577) then it's worth noting that there has not been a single Jest release since the fix for that was merged - I don't know why that is the case. Therefore there is currently no version of Jest on npm that has the fix available |
Thanks @JamesHenry - might be that Jest team are a bit too busy with Jest 27..? |
This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs. |
Its not stale, bot. |
This also happens with jest v27: TypeError: Converting circular structure to JSON
--> starting at object with constructor 'Object'
| property 'element' -> object with constructor 'Object'
| property 'componentProvider' -> object with constructor 'Object'
--- property 'parent' closes the circle
at stringify (<anonymous>) "@nrwl/angular": "12.9.0",
"jest": "27.0.3",
"jest-preset-angular": "9.0.7",
"ts-jest": "27.0.3",
"typescript": "4.3.5" |
Hi there is this still an issue with the latest version of nx? I see the related jest issue is still open as well but wanted to see we can close this issue or not 😄 |
if this is still an issue please provide a minimal git repo with the issue thanks! |
Much has changed since I first posted this issue. I have no longer come across this this issue and I am unable to reproduce using:
On my side - I am happy to close... |
Thanks for confirming @ubergeoff! |
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
Previously - before the update that introduced Jest 26 - missing dependency were outlined within the spec tests very nicely/clearly.
But now: Post - Jest 26 update:
Expected Behavior
In the versions prior to Jest 26 - the error was much, much clearer - and pointed to the exact issue at hand:
I feel this is regression as we now - have to "guess" what is missing from the tests - this leads to a much worse DX :(
Steps to Reproduce
Create a simple service that has a simple dependency on something. Example: ensure your service has DI of: HttpClient in it.
Example:
Inject this "new" service into your component.
Run your component spec test - without mocking out any of your dependency.
Failure Logs
However - this should actually show me something like:
Environment
The text was updated successfully, but these errors were encountered: