title: Testing for instanceof using Jasmine
body: <p>I'm new to Jasmine and testing in general. One block of my code checks whether my library has been instantiated using the new operator:</p>
  
  <pre><code> //if 'this' isn't an instance of mylib...
   if (!(this instanceof mylib)) {
       //return a new instance
       return new mylib();   
   }
  </code></pre>
  
  <p>How can I test this using Jasmine?</p>