aws-sdk-mock
aws-sdk-mock copied to clipboard
Is it possible to mock a service constructor
From the docs (and playing around a bit with the code) it looks like it's not possible to stub a constructor for a service. e.g. I only want to check which options are passed in to AWS.DynamoDB
.
Constructors are stubbed automatically, you can write assertions like this:
const AWS_SDK = require('aws-sdk');
sinon.assert.calledWith(AWS_SDK.DynamoDB, { apiVersion: '2012-08-10' });