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.
I found an issue here, which is 1.5 years old, about the fact that it takes time for express to stop and that it was fixed in v1.0.1. However, the amount of time Jest has to wait is actually equal to the amount of seconds I provide to storeTimeout key of server configs. I opened the sources and found out that you're using bluebird's Promise.delay(), which uses setTimeout() under the hood. Most likely the event loop is not empty even after you stop the server, since it has a scheduled callback to execute.
Hi, thanks for this awesome thing! Seems like I found a bug with storeTimeout. I'm using Jest and have the following hooks:
I keep getting such errors:
I found an issue here, which is 1.5 years old, about the fact that it takes time for express to stop and that it was fixed in v1.0.1. However, the amount of time Jest has to wait is actually equal to the amount of seconds I provide to
storeTimeout
key of server configs. I opened the sources and found out that you're using bluebird'sPromise.delay()
, which usessetTimeout()
under the hood. Most likely the event loop is not empty even after you stop the server, since it has a scheduled callback to execute.Thanks!