var mongoose = require('./testUtils/mongooseTestWrapper.js'), Greetee; exports.setUp = function(callback) { // reset the schemas to ensure that any changes are picked up by the mongoose singleton mongoose.resetSchemas(); // add the schemas back again Greetee = require('./greetee.js'); // connect to a test database and drop all the greetees from it mongoose.connect('mongodb://localhost/UnitTest_Greetee'); Greetee.remove({}, function(err) { callback(); }); }; ...