Issue with integration tests for DELETE COMMENTS ticket

I have done all previous tickets, but there is a problem with DELETION of COMMENTS one.
Unit tests are passed but integration are not. Error message in status page is: Delete Comments: Unable to retrieve movie comments.
Implementation of method is:
static async deleteComment(commentId, userEmail) {
try {
const deleteResponse = await comments.deleteOne({
‘_id’: ObjectId(commentId),
‘email’: userEmail,
});
return deleteResponse
} catch (e) {
console.error(Unable to delete comment: ${e});
return { error: e }
}
}

As far as I can tell, your implementation is functionally identical to mine, and mine passed both the unit tests and the integration tests.

I can’t find the string “Unable to retrieve movie comments” anywhere in the files I unzipped from the mflix-js.zip handout, so I can’t even tell where this error is being thrown. Sorry :frowning_face:

Hello, Simon!

I have attached 2 screenshots:

  1. Error message from Status psge of application.

  2. Search result from Webstorm window with results. Parameter of search was: ’
    Unable to retrieve movie comments
    '.

What should I do in this case?

Best regards,

Andrei

According to screenshot, the error “Unable to retrieve movie comments” is being thrown from client-application`s bundle.

The issue is resolved.
I have made backup of .env and DAO, have deleted folder with project, reinstall all from scratch and have made mongorestore. Then I have copied back DAO and .env, have made npm start. All integration tests for DELETE COMMENTS ticket in STATUS page are passed.

1 Like