You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Following #1022, I have created two separate bug identified in v3.
Describe the bug
Since we migrated to v3, each test of our app hang and the following warning appear :
Jestdid not exitonesecondafterthetestrunhascompleted.Thisusuallymeansthatthereareasynchronousoperationsthatweren'tstoppedinyourtests.ConsiderrunningJestwith`--detectOpenHandles`totroubleshootthisissue.
This is already a known issue #899, didn't know how to fix it "easily".
Meanwhile a workaround for the testing suite it's just:
constLinguiProvider: React.FC=({ children })=>{return(<I18nProvideri18n={i18n}forceRenderOnLocaleChange={false}>{children}</I18nProvider>)}
forcingRenderOnLocaleChange to false in this way the i18n.activate() will just run once, if the locale doesn't change, in your case it's always fr so..
I've tried your codebase and the time:
Test Suites: 228 passed, 228 total
Tests: 5 skipped, 1308 passed, 1313 total
Snapshots: 90 passed, 90 total
Time: 70.639s, estimated 92s
More or less 1 minute, not bad at all for 1313 tests ;)
Hi @semoal and thanks, I hope you had a good week-end too.
I am checking the workaround now.
You are lucky cause my test without --runInBand locally takes Time: 106.702s
Our CI takes even more time, 219.71s + 291.29s :
Time: 219.71s
Ran all test suites.
Jest did not exit one second after the test run has completed.
This usually means that there are asynchronous operations that weren't stopped in your tests. Consider running Jest with `--detectOpenHandles` to troubleshoot this issue.
If you try to run the test with yarn run test:unit --runInBand locally (as in our CI), you will also have the test process hanging.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Following #1022, I have created two separate bug identified in v3.
Describe the bug
Since we migrated to v3, each test of our app hang and the following warning appear :
To Reproduce
This is how:
Expected behavior
We expect our test to close when they finish, instead we have open handles which cause our whole tests suite to take 7min instead of 4.
Additional context
3.8.9
7.8.4
The text was updated successfully, but these errors were encountered: