This is an in-memory 'pretend' mongodb. The goal is to make the interface compatible with the real mongodb module so they are interchangeable.
There are a TON of features for mongo and I can't write them all myself- so pull requests are encouraged! My initial goal was to provide basic CRUD operations to enable this to work as a throw-something-together tool.
Maybe you don't want to (or can't) connect to a MongoDB instance for your tests?
Maybe you want to throw together a quick example app?
var mongodb = ;mongodbmax_delay = 0;//you can choose to NOT pretend to be async (default is 400ms)var MongoClient = mongodbMongoClient;MongoClientpersist="mongo.js";//persist the data to disk// Connection URLvar url = 'mongodb://localhost:27017/myproject';// Use connect method to connect to the ServerMongoClient;
Well, you know.. the usual:
$ npm install mongo-mock