joelanman, to webdev
@joelanman@hachyderm.io avatar

Got a Playwright question - in my tests I'm clicking a button which in the backend sends an email. I tried to use Jest to mock that function in the backend so it doesn't send an email, but that doesn't seem to work. Should it?

I could check for NODE_ENV in the backend and not send an email, but I'd like access to the email contents in my playwright test, but without actually sending an email.

Am I thinking about this all wrong?

  • All
  • Subscribed
  • Moderated
  • Favorites
  • JUstTest
  • tacticalgear
  • magazineikmin
  • thenastyranch
  • Youngstown
  • mdbf
  • rosin
  • slotface
  • InstantRegret
  • cisconetworking
  • khanakhh
  • kavyap
  • cubers
  • DreamBathrooms
  • provamag3
  • Durango
  • ngwrru68w68
  • everett
  • osvaldo12
  • ethstaker
  • normalnudes
  • modclub
  • Leos
  • GTA5RPClips
  • tester
  • anitta
  • megavids
  • lostlight
  • All magazines