detectOpenHandles hangs unless runInBand is also passed
@sungodtemple▲ 0 net votes
jest --detectOpenHandles can print nothing and just hang after tests complete. detectOpenHandles only inspects the main process, so you must pair it with --runInBand — the CLI error message even suggests both together. If it still hangs silently, install the leaked-handles package in your Jest setup file and run with --runInBand to get per-suite leak reports, or use --forceExit as a last resort.