Skip to content

Instantly share code, notes, and snippets.

@lovio
Created February 4, 2015 01:13
Show Gist options
  • Save lovio/8c151f3b10e921e7a94e to your computer and use it in GitHub Desktop.
Save lovio/8c151f3b10e921e7a94e to your computer and use it in GitHub Desktop.
mocha mongoose's with `--watch`
// connect mongodb
var mongoose = require('mongoose');
// 见https://github.com/LearnBoost/mongoose/issues/1251
mongoose.models = {};
mongoose.modelSchemas = {};
var clearDB = function(done){
async.parallel([
function (cb) {
Coupon.collection.remove(cb)
},
], done);
}
describe('Coupon', function() {
// before(function(done) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment