Thanks for the info. In the example given will running the unit tests still result in connecting to the dynamodb database via 'const documentClient = new AWS.DynamoDB.DocumentClient()'
I double-checked by setting a breakpoint and it's not being triggered. Notice that the deps property is actually a function:
exports.deps=()=>{// notice the closure syntaxconstAWS=require('aws-sdk')constdocumentClient=newAWS.DynamoDB.DocumentClient()returnPromise.resolve({dynamoBatchWrite:params=>documentClient.batchWrite(params).promise()})}
.. its body contents should only be run when deps is invoked as a function (in this case async).
Thanks for the info. In the example given will running the unit tests still result in connecting to the dynamodb database via 'const documentClient = new AWS.DynamoDB.DocumentClient()'
I double-checked by setting a breakpoint and it's not being triggered. Notice that the deps property is actually a function:
.. its body contents should only be run when deps is invoked as a function (in this case async).
Perfect, thanks for your time and this great article.