Ticket: Get Comments (unit test fails but integration test passes)

I don’t think there is anything wrong with my code. The code works fine in Compass, but when this is put into the moviesDAO.js and tested against npm test -t get-comments, it fails.

Furthermore, when I test it against the UI http://localhost:5000/status/, it gives me the correct validation string, which has passed my integration testing.

So then, why is it that the jest test case continues to fail for this one? I keep getting the following error.

Please help me to get to the bottom of this. I have gone through all the previous posts for this ticket, but didn’t find anything that explains this… Thank you!!

Hello PuneetC,
I also got the same error, its not your code fault. It’s the timeout error of JEST.You can fix it by adding jest.setTimeout(50000); in get-comments.test.js file.

1 Like

Thank you MohammadFaisal… this change worked for me. :slight_smile:

Happy to know that it helps you.:grinning: