cypress-mongodb
Version:
Cypress MongoDB plugin
23 lines (22 loc) • 1.34 kB
TypeScript
import { Document } from 'mongodb';
declare global {
namespace Cypress {
interface Chainable<Subject> {
aggregate(pipeline: Document[], options?: any): Chainable<Subject>;
createCollection(collection: string, options?: any): Chainable<Subject>;
dropCollection(collection: string, options?: any): Chainable<Subject>;
insertOne(document: Document, options?: any): Chainable<Subject>;
insertMany(documents: Document[], options?: any): Chainable<Subject>;
deleteOne(filter: Document, options?: any): Chainable<Subject>;
deleteMany(filter: Document, options?: any): Chainable<Subject>;
findOne(query: Document, options?: any): Chainable<Subject>;
findOneAndUpdate(filter: Document, document: Document, options?: any): Chainable<Subject>;
findOneAndDelete(filter: Document, options?: any): Chainable<Subject>;
findMany(query: Document, options?: any): Chainable<Subject>;
updateOne(filter: Document, document: Document, options?: any): Chainable<Subject>;
updateMany(filter: Document, document: Document, options?: any): Chainable<Subject>;
runCommand(command: Document, options?: any): Chainable<Subject>;
}
}
}
export declare function addCommands(): void;