-
-
Notifications
You must be signed in to change notification settings - Fork 6.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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Jest hangs on last test suite constantly #6740
Comments
Without a reproduction this is not actionable for us. Happy to reopen if one is provided. |
Facing the same issue. @RajaJaganathan Were you able to resolve it? |
@laumair There is no issue with jest, I have fixed this issue by modifing my tests code. I faced this issue when I migrated from mocha to jest. One notable issue is that we need to call 'done' callback properly if test is asynchronous. For example, Test might completed before our asynchronous function call gets completed. Those asynchronous call might be the problem. |
I have a completely trivial test like the following: test('something', async () => {
let value = await something();
expect(value).toBe(true)
}) Even if I explicitly finish the test with test('something', async (done) => {
let value = await something();
expect(value).toBe(true)
done()
}) Most likely because Why doesn't it respect the timeout? How do you diagnose something like this? |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
馃悰 Bug Report
Jest is hanging constantly on last test suite runs. Every time the last test suite is different. I have tried with
runInBand
options but no luck.I got some luck after running
node_modules/.bin/jest --clearCache
thennode_modules/.bin/jest
now works mostly. But still, it's not stable enough.
"scripts": { "test": "jest --clearCache && jest --silent" }
I have installed watchman via homebrew also as pointed out on other issues but no luck. Could please help us to fix the issue. Please let me know if any information is needed.
Environment Information:
Thanks!
The text was updated successfully, but these errors were encountered: