title: Karma AngularJS bootstrap and window variable
body: <p>I am trying to write a test for my application and I'm loading files in with Karma into PhantomJS. The problem is that one of the files causes a page reload due to window variables.</p>
  
  <p>The files are included like so:</p>
  
  <pre><code>files: [
      'bower_components/angular/angular.js',
      'js/**/*.js'
  ]
  </code></pre>
  
  <p>The main application file (main.js) contains this:</p>
  
  <pre><code>if ( window.top !=== window.self ){
      window.location.href = 'someOtherURL.html';
  }
  
  // PhantomJS 2.1.1 ERROR
  // Some of your tests did a full page reload!
  </code></pre>
  
  <p>So none of my tests run because the inclusion of this one file stops execution due to page reload.</p>
  
  <p>My question is, how can I set the window variables so that I can run this test? </p>