Refactoring Mailer.ts for Flexibility
Learned my lesson. Oh, Claude3… “I want to refactor mailer.ts to accept two optional arguments, apikey and transport. If it receives the apikey it will create the sendgrid transport, otherwise it will use the transport passed in. I then want my test to create a mock object that can act as the transport and test all the expectations against that so that I don’t have to mock nodemailer.