From 71c4d4b5557f283ed45a561003fcd7e3e0ab8e77 Mon Sep 17 00:00:00 2001 From: Ilan Biala Date: Thu, 5 Mar 2015 22:32:00 -0500 Subject: [PATCH] Cleanly track mongoose connection in test task sequence --- gulpfile.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index bcdab553a4..f8fab60612 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -115,15 +115,13 @@ gulp.task('less', function () { gulp.task('openMongoose', function (done) { var mongoose = require('./config/lib/mongoose.js'); - mongoose.connect(function(db) { - done(); - }); + mongoose.connect(done); }); gulp.task('closeMongoose', function (done) { var mongoose = require('./config/lib/mongoose.js'); - mongoose.disconnect(); + mongoose.disconnect(done); }); // Mocha tests task