I am trying to stub the mongoose dependency used in this object:
var Page = function(db) { var mongoose = db || require(\'mongoose\'); if(!this ins
page = new Page(); sinon.stub(page, 'save', function(cb){ cb(null) })
Above code is deprecated.
Please try to add fake function for your stub as below -
sinon.stub(page, 'save').callsFake(function(cb){ // do your Fake code cb(null) })