반응형
detectOpenHandles
-
Jest did not exit one second after the test run has completed.테스팅/JEST 2019. 11. 6. 16:36
1. 문제 HTTP API 통신 테스트를 하다가 다음과 같은 경고를 만났다. 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. 2. 해결 테스트 실행 완료 후 1초 동안 Jest가 종료되지 않았다. 이 뜻은 테스트의 비동기 작업들이 종료되지 않았다는 것이다. 그래서 Jest를 실행할 때, '--detectOpenHandles' 옵션을 사용하는..