Jest did not exit one second after the test run has completed using express

前端 未结 5 1763
孤独总比滥情好
孤独总比滥情好 2021-02-05 14:24

I\'m using JEST for unit testing my express routes.

While running the yarn test all my test case are getting passed, but I\'m getting an error



        
5条回答
  •  情书的邮戳
    2021-02-05 15:02

    For me it was a different issue I was using supertest to test routes itself so I had to close the connection to the server itself.

    afterAll(done => {
        server.close();
        done();
    });
    

    If this is not the case for you this issue might have something for you

提交回复
热议问题