title: How to check if you are using Karma?
body: <p>How can I check if I'm running my script on Karma?</p>
  
  <p>When I'm on Karma, I tried with this:</p>
  
  <pre><code>var path = '';
  
  if (typeof window.karma !== 'undefined') {
    path += 'base/';
  } 
  
  alert(typeof window.karma); // undefined
  </code></pre>
  
  <p>I also tried with this:</p>
  
  <pre><code>var path = '';
  
  if (typeof window.__karma__ !== 'undefined') {
    path += 'base/';
  } 
  
  alert(typeof window.__karma__); // still undefined
  </code></pre>
  
  <p>Any ideas?</p>