I'm trying to validate that I supplied the correct arguments into the service ctor for SNS, but I don't know how to do it.
Now, I do know how to validate publish, but again, I'm trying to verify expectations for the SNS function/ctor.
Here's some pseudo code:
//code
const AWS = require('aws-sdk');
const SNS = new AWS.SNS({bobby:'no'});
//test
const AWSmock = require('aws-sdk-mock');
describe('something', () => {
beforeAll(()=>{
AWSmock.mock('SNS','publish', Promise.resolve());
});
test('doing it', () => {
const f = require('file');
expect(AWSmock.SNS.calledWith({})).toEqual(true); //this example would be false, but I can't figure out how to reference the SNS method here
});
});