--detectOpenHandles not showing any message even test not finished completely.
See original GitHub issueI am going to build Mongodb environment in typescript project. I referenced this page https://jestjs.io/docs/en/mongodb and sample project https://github.com/vladgolubev/jest-mongodb
When I run jest
in my project, it pass test ( I setup very simple test to test only mongodb environment) but it doesn’t finish with success.
It recommend me to use --detectOpenHandles
to check non stopped asynchronous operations.
But when I run jest with this flag, jest --detectOpenHandles
it finish successfully without showing what operations are not stopped.
I tried many times, and it work same as I mentioned above.
Thanks
Issue Analytics
- State:
- Created 5 years ago
- Reactions:16
- Comments:25 (3 by maintainers)
Top Results From Across the Web
are there side effects of running jest with --detectOpenHandles
Jest did not exit one second after the test run has completed. While taking Jest's recommendation to run with --detectOpenHandles and ending up ......
Read more >How to find the root cause of a failing test if Jest doesn't tell ...
In our case, there's an option called --detectOpenHandles that solves our problem. By using this command, Jest should print the actual ...
Read more >Need help, code seems right but still getting error when i test ...
Ran all test suites matching /user-report/i. Teardown Mongo Connection Jest did not exit one second after the test run has completed.
Read more >jest | Yarn - Package Manager
Fast interactive mode can switch between running all tests or only test files related to ... [jest-config] Do not warn about preset in...
Read more >Jest test reporting with Tesults
If you are not using Jest please see the Node.js docs for integrating with ... Consider running Jest with `--detectOpenHandles` to troubleshoot this...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
We have an issue template that requests reproduction steps - this report is missing that. Happy to reopen if one is provided
Running with
jest --forceExit --detectOpenHandles
seems to work as expected. But it seems like a hack…