title: AngularJS end-to-end tests using Karma with a static file instead of server
body: <p>I have end-to-end tests for my AngularJS app and I'm using Karma as my test runner. I currently have the following in my Karma config:</p>
  
  <pre><code>config.proxies = {
    '/': 'http://localhost:9292/'
  };
  </code></pre>
  
  <p>I have to separately start up a simple Rack app that serves my single static AngularJS HTML file. I want to have end-to-end tests that test a static file, much like loading <code>file:///Users/sarah/my-app/index.html</code>. I've tried not setting a proxy and doing <code>browser().navigateTo 'index.html'</code> in my tests, but the tests all fail because my <code>element</code> calls "did not match any elements". It looks like the index.html page is not getting loaded.</p>
  
  <p>I've also tried setting a proxy where <code>'/': 'file:///Users/sarah/my-app/</code> and then doing <code>browser().navigateTo '/index.html'</code> in my tests, but that failed with the error "options.host and options.port or options.target are required". While I guess I could set the port to 80, there is no host--that's the point.</p>
  
  <p>My goal with this is I want to have my end-to-end tests run automatically on <a href="https://semaphoreapp.com/" rel="nofollow">Semaphore</a>, where my AngularJS unit tests currently run. The unit tests are different because they don't require an instance of my app to be accessed.</p>
  
  <p>Is what I'm wanting to do possible? If not, is there any way I can run both unit and end-to-end tests of my AngularJS app on Semaphore without hosting my app on some public server that Semaphore can access?</p>