cypress-mongodb
JSON →A Cypress plugin that provides custom commands (createCollection, dropCollection, insertOne, insertMany, findOne, findMany, updateOne, updateMany, deleteOne, deleteMany, aggregate) for interacting with a MongoDB server during end-to-end tests. Current stable version is 7.0.0, released on a periodic cadence. It wraps the MongoDB Node.js driver v7 and supports MongoDB 7-8 and Node 20-24. Key differentiators: it works with both local and remote MongoDB instances, allows per-command overrides for database/collection, and offers a failSilently option to avoid failing tests on expected errors. TypeScript types are included. A known issue is that if your project uses the 'mongodb' package, it must be version 7.x to avoid Webpack compilation errors.