I have a function like this:
var updateSomething = function(arg1, arg2, callback) {
...
db.update(arg, function(err, res) {
callback(err, res);
});
};
I'm testing an API doing some requests that internally call to this function and I'm interested in known the callback value when it's called, How can I spy with Sinon the value of res and err in my unit test?