title: PhantomJS exits after syntax error when running unit tests
body: <p>We are running our Jasmine unit tests using a combination of Karma and PhantomJS on the build server. Running the tests locally on Chrome works fine, the error doesn't occur there (which is a different question). Here's what's happening:</p>
  
  <p>At one point in the execution, the test runs into an "undefined" error and simply stops:</p>
  
  <pre><code>PhantomJS 1.9.7 (Mac OS X) ERROR
    TypeError: 'undefined' is not an object (evaluating 'dropScope.resize')
    at /Users/nwinkler/workspaces/.../foo.js:250
  PhantomJS 1.9.7 (Mac OS X): Executed 654 of 1221 ERROR (14.512 secs / 14.386 secs)
  DEBUG [karma]: Run complete, exitting.
  DEBUG [launcher]: Disconnecting all browsers
  </code></pre>
  
  <p>Even when running karma with the <code>--force</code> flag, it still exits at this point.</p>
  
  <p>Is there a way to have Karma/PhantomJS continue running the tests without stopping at this point? Why can't PhantomJS recover from this error?</p>
  
  <p>I'm not looking for solution for the <code>undefined</code> error, that's a different topic - I would just like to understand why PhantomJS and Karma exit at this point and don't continue with the remaining unit tests.</p>