Zaista / cypress-mongodb

Cypress MongoDB plugin
MIT License
17 stars 8 forks source link

Returns data changed when updating or deleting files in result #31

Closed raialmeida closed 1 year ago

raialmeida commented 1 year ago

Hello,

Currently does not return changed or deleted data from a collection in the result

In version 5.2 of mongo, it is possible to use the function findOneAndUpdate() or findOneAndDelete passing as option returnDocument 'after' or 'before' to return the changed or deleted result.

It's cool any mongoDB command has the option to return the result in the console.

Note: I noticed that apparently there is a conflict when updating to a new version of mongoDB

Zaista commented 1 year ago

findOneAndUpdate and findOneAndDelete support was added in v5.3.0

Regarding the latest version of mongodb, currently don't know what causing it, but anything above 4.10 won't work atm.