Jest test hanging

When running integration tests that connect to a docker-based db, it seems like the connection stays alive, thus making my tests hang forever. They all run and pass successfully, but then the process never ends. If I pass --forceExit to jest, it works properly, but this seems like a bandaid. What is the recommended way to deal with this?

I wasn't able to find a good way to manually close the connection in a tear down step
Was this page helpful?