A plugin for Cypress that provides MongoDB interaction capabilities directly within Cypress tests. Version 1.2.0 includes TypeScript definitions and integrates with Cypress 10 and later via setupNodeEvents. It offers CRUD operations as Cypress chainable commands (e.g., cy.mongoFindMany) and task-based execution. Compared to alternatives like cypress-mongodb, it supports connection options and is maintained on GitHub.
npm install mongodb-cypressNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Sets up mongodb-cypress with Cypress 10+ config and registers commands, then uses cy.mongoInsertOne and cy.mongoFindMany in a test.
Prefix your own task names or avoid using same names as those exposed by mongoFunctions.
Use the Cypress 10+ configuration pattern shown in the README.
Ensure cypress.env.json or config env includes mongodb with uri and db fields.
Add mongoFunctions() call in cypress/support/commands.js after require.
Set env.mongodb.uri and env.mongodb.db in cypress.config.js or cypress.env.json.