DEV Community

Discussion on: An Introduction to testing in Javascript

Collapse
 
chiubaca profile image
Alex Chiu

Yes mocking in general. I've watched a dozen tutorials and read many articles like this, but I just cant seem grok it in practice. Especially when there are third party libs involved I find mocking conceptually really confusing. It's hard for me to articulate to be honest.

The specific issue I have at the moment is around AWS lambda functions. My business logic resides all in callback function which has events I can tap into. I'm currently so lost trying to figure out how A) I mock the callback function B) how I mock the all properties in the event object... 😵