I haven't long written es5, so I forgot. Can you help how to fix this?
let mock = {
DynamoDB: function() {
{
send: function() {console.log('sending...')}
}
},
};
then not working.
let client = new mock.DynamoDB();
client.send(); // does not write to console
A constructor function should assign to a property of this
.
let mock = {
DynamoDB: function() {
this.send = function() {
console.log('sending...')
}
}
};
let client = new mock.DynamoDB();
client.send();