title: How can I run tests with a headless browser?
body: <p>Using: </p>
  
  <p><code>ng test</code></p>
  
  <p>Angular CLI runs the tests by default in Chrome, which is great, but what if I need to run them in a console-only environment (headless browser)?</p>
  
  <p>Also it would be nice if I can specify if I want browser-less or not each time I run it, so something like:</p>
  
  <p><code>ng test --browsers MyHeadLessBrowser</code></p>
  
  <hr>
  
  <p><strong>Edit</strong>:</p>
  
  <p>running PhantomJS I got the following:</p>
  
  <blockquote>
    <p>PhantomJS 2.1.1 (Linux 0.0.0) ERROR
      TypeError: useValue,useFactory,data is not iterable!
      at <a href="http://localhost:9876/_karma_webpack_/polyfills.bundle.js:854" rel="noreferrer">http://localhost:9876/_karma_webpack_/polyfills.bundle.js:854</a></p>
  </blockquote>
  
  <hr>
  
  <blockquote>
    <p>eferenceError: Can't find variable: Intl in <a href="http://localhost:9876/_karma_webpack_/vendor.bundle.js" rel="noreferrer">http://localhost:9876/_karma_webpack_/vendor.bundle.js</a> (line 49362)
            intlDateFormat@<a href="http://localhost:9876/_karma_webpack_/vendor.bundle.js:49362:20" rel="noreferrer">http://localhost:9876/_karma_webpack_/vendor.bundle.js:49362:20</a></p>
  </blockquote>