--detectOpenHandles not showing any message even test not finished completely.

See original GitHub issue

I 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.

detecthandle

Thanks

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:16
  • Comments:25 (3 by maintainers)

github_iconTop GitHub Comments

66reactions
SimenBcommented, Sep 3, 2018

We have an issue template that requests reproduction steps - this report is missing that. Happy to reopen if one is provided

16reactions
mdelclarocommented, Feb 4, 2020

Running with jest --forceExit --detectOpenHandles seems to work as expected. But it seems like a hack…

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found