yunabe / tslab

Interactive JavaScript and TypeScript programming with Jupyter
Apache License 2.0
702 stars 44 forks source link

yarn test displays a warning: Jest did not exit one second after the test run has completed. #3

Closed yunabe closed 1 year ago

yunabe commented 4 years ago

How to reproduce

yarn test

Problem

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.

Background I started to see this on Mac/Linux since https://github.com/yunabe/tslab/commit/7ffa3074e1f7648b3aba02bc14170a91d35bac28. We don't see this warning on travis CI: https://travis-ci.org/yunabe/tslab/builds/588461578

Solution

With --runInBand option, this warning disapears.