title: Testing javascript alerts with Jasmine
body: <p>I'm writing some Jasmine tests for some legacy javascript that produces an alert or a confirm at some points in the code. </p>
  
  <p>At the moment where the alert pops up it pauses execution in the browser requiring me to press ok before going on.</p>
  
  <p>I'm sure I'm missing something but is there a way of faking an alert? </p>
  
  <p>Even better is it possible to find out what the message was for the alert?</p>
  
  <p>Thanks for your help.</p>