unit test for dynamodb query is a function
...
function query() {
return dynamo.query(this.params, function(err, data){
if(err){
return err.stack;
}else{
console.log("Query Succeeded");
return data.item;
}
}).Promise();
...