Jest tests leaking due to improper teardown
As suggested in the warning, add –detectOpenHandles option to jest’s script in package.json file: “scripts”: { “test”: “jest –watchAll –detectOpenHandles” } Dont forget to stop then start the server ! This solution can work whatever your problem. But, according to your case, your problem is coming from the redis connection. You need to close redis … Read more