Skip to content

Instantly share code, notes, and snippets.

@nanlabsweb
Created March 26, 2017 19:02
Show Gist options
  • Save nanlabsweb/cab1c8f681dd3a9152d30497f065f112 to your computer and use it in GitHub Desktop.
Save nanlabsweb/cab1c8f681dd3a9152d30497f065f112 to your computer and use it in GitHub Desktop.
var feature_change = require ('feature-change');
var Q = require(‘q’);
exports.getData = function(request, response, next) {
var options = {
expected: function(cb){
currentImplementation(request, response, next, cb);
},
actual: function(cb){
newImplementation(request, response, next, cb);
},
logAction: function(currentResult, newResult){
//This method will be called if the resuts are different
var resultstDifferences = getResultsDifferences(currentResult, newResult);
logFeatureChangeResultDifferences(resultsdifferences);
}
}
feature_change(options, function(err, result){
response(result);
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment