title: Detecting console.log() calls
body: <p>I'm trying to write a test case for a debugging method that writes messages to the JavaScript console using <code>console.log()</code>. The test has to check that the message has been successfully written to the console. I'm using jQuery.</p>
  
  <p>Is there a way to attach a hook to <code>console.log()</code> or otherwise check that a message has been written to the console, or any other suggestions on how to write the test case?</p>