From 320662d2472318bbbf50ca46a7c827d33d4f8638 Mon Sep 17 00:00:00 2001 From: Kevin O'Hara Date: Mon, 3 Aug 2015 21:09:46 -0400 Subject: [PATCH] updating mocha --- package.json | 2 +- test/mock/sfdc-rest-api.js | 6 +++++- test/promises.js | 4 ++++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 77c0923..b006490 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "gulp-jshint": "^1.9.0", "jade": "1.3.1", "jshint-stylish": "^1.0.0", - "mocha": "1.18.2", + "mocha": "^2.2.5", "run-sequence": "^1.0.2", "should": "3.3.1" }, diff --git a/test/mock/sfdc-rest-api.js b/test/mock/sfdc-rest-api.js index 4b2e491..6dee4b4 100644 --- a/test/mock/sfdc-rest-api.js +++ b/test/mock/sfdc-rest-api.js @@ -67,7 +67,11 @@ module.exports.start = function(port, cb) { }); }); - server.listen(port, cb); + server.listen(port, function(err){ + if(err) return cb(err); + console.log('started server'); + cb(); + }); } // return an example client diff --git a/test/promises.js b/test/promises.js index 66edcd6..4f8288a 100644 --- a/test/promises.js +++ b/test/promises.js @@ -160,6 +160,10 @@ describe('promises', function() { }); + // reset the lastRequest + afterEach(function() { + api.reset(); + }); after(function(done) { api.stop(done);