Open createthis opened 6 years ago
It appears that your prs
is being instantiated and initialized outside of your mocked scope. My understanding is that the mock with be registered before creating the object depending on the mock.
The code you've referenced is creating the AWS.SES
in its constructor, not when .SendEmail()
is called.
Hello,
I can't figure out what is going wrong here. I'm trying to mock SES sendMail, which is used inside the hapi-mail package here: https://github.com/paullang/hapi-mail/blob/master/lib/email-ses.js#L12
My test looks something like this:
It seems like the mock just isn't happening. I never see "here" printed in the test output and this is the error I get:
I'm kind of at a loss for how to debug this. Any ideas?