import * as mongodb from "mongodb" ; import { MockDb } from "./mockDb" ; import { EventEmitter } from "events" ; import { MongoClientCommonOption } from "mongodb" ; export class MockMongoClient extends EventEmitter implements mongodb . MongoClient { connect ( ) ; connect ( callback ) ; connect ( callback ? ) { throw new Error ( "Method not implemented." ) ; } close ( callback ) ; close ( force ? ) ; close ( force , callback ) ; close ( force ? , callback ? ) { throw new Error ( "Method not implemented." ) ; } db ( dbName , options ? ) { return new MockDb ( dbName ) ; } logout ( callback ) ; logout ( options ? ) ; logout ( options , callback ) ; logout ( options ? , callback ? ) { throw new Error ( "Method not implemented." ) ; } startSession ( options ? ) { throw new Error ( "Method not implemented." ) ; } isConnected ( options ? ) { throw new Error ( "Method not implemented." ) ; } watch ( pipeline ? , options ? ) { throw new Error ( "Method not implemented." ) ; } withSession ( operation ) ; withSession ( options , operation ) ; withSession ( options , operation ? ) { throw new Error ( "Method not implemented." ) ; } }