This project is to reproduce a probable issue in Jest and show source to trigger error
Registered timeouts are not detected by the jest "detectOpenHandles" option
- node
- npm
I only tested this on MacOS. I assume the same behaviour in other operating systems.
- Clone repository
git clone https://github.com/TarSzator/jest-open-handle-test.git
orgit clone git@github.com:TarSzator/jest-open-handle-test.git
- Go into the folder
cd jest-open-handle-test
- Install dependencies
npm install
- Run test with an open handler
npm run testFail
- Run test with an open handler and detectOpenHandles option
npm run testFailWithDetect
- Run test with work around
npm run testFailWithWorkaround
- Run test with closed handler
npm run testSuccess