mocha-mongo
Set of mongodb testing helpers for mocha
mocha's TDD testing style used here and only the test function is used
Initialization
var mongo = 'mongodb://localhost';
Using the db in tests
var ready = mongo; //only need to create this once ;
Use fresh collections without data
We need to ensure collections are cleaned before running the test.
var clean = mongo; //only need to create this once ;
Drop the whole db
var drop = mongo; //only need to create this once ;