Hi guys,
After a lot of hours… I cannot do with the answer… I’ve checked all, and tried all… but nok…
This is my 2 codes for 2 functions:
const commentDoc = { movieId: ObjectId(movieId), name: user.name, email: user.email, text: comment, date :date }
const updateResponse = await comments.updateOne(
{ _id: ObjectId(commentId), email: userEmail },
{ $set: { text: text , date: date} },
)
I expect all it’s ok but not…
If I use without ObjectId(…) I get the third test ok… but with ObjectId I get all three nok…
Any hint?
THis is my error:
BTW: All past tests were ok.
Thanks in advance,
Xavi