title: "ng test" can't do coverage report and TeamCity reporting at the same time
body: <p>I'm trying to run unit tests for an Angular CLI project on a TeamCity build server.</p>
  
  <p>If I use the command:</p>
  
  <pre><code>ng test --single-run --code-coverage
  </code></pre>
  
  <p>then, as expected, I get a test coverage report but the individual test results don't show up in TeamCity.</p>
  
  <p>If I turn on TeamCity reporting:</p>
  
  <pre><code>ng test --single-run --code-coverage --reporters teamcity
  </code></pre>
  
  <p>then the tests pass and TeamCity reporting works perfectly, but it silently fails to produce a code coverage report. This behaviour is reproducible on my local machine, so it's nothing to do with how the build server is configured.</p>
  
  <p>Is there any reason why these two options should be mutually exclusive?</p>
  
  <p>Note - this isn't the same problem as <a href="https://stackoverflow.com/questions/19266655/configuring-code-coverage-report-for-karma-on-teamcity?rq=1">Configuring code coverage report for Karma on TeamCity</a>. If the report is there then TeamCity shows it correctly, but if I turn on the TeamCity reporting flag then the coverage folder simply doesn't exist.</p>
  
  <p>Additional info:</p>
  
  <ul>
  <li>Angular-CLI version 1.0.0-rc.4 (problem first discovered using 1.0.0-rc.1)</li>
  <li>Karma version 1.4.1</li>
  <li>Node version 6.9.4</li>
  <li>Windows 7 Enterprise</li>
  </ul>
  
  <p>Karma configuration:</p>
  
  <pre class="lang-js prettyprint-override"><code>// Karma configuration file, see link for more information
  // https://karma-runner.github.io/0.13/config/configuration-file.html
  
  module.exports = function (config) {
    config.set({
      basePath: '',
      frameworks: ['jasmine', '@angular/cli'],
      plugins: [
        require('karma-jasmine'),
        require('karma-chrome-launcher'),
        require('karma-jasmine-html-reporter'),
        require('karma-coverage-istanbul-reporter'),
        require('@angular/cli/plugins/karma'),
        require('karma-teamcity-reporter')
      ],
      client:{
        clearContext: false // leave Jasmine Spec Runner output visible in browser
      },
      files: [
        { pattern: './src/test.ts', watched: false }
      ],
      preprocessors: {
        './src/test.ts': ['@angular/cli']
      },
      mime: {
        'text/x-typescript': ['ts','tsx']
      },
      coverageIstanbulReporter: {
        reports: [ 'html', 'lcovonly' ],
        fixWebpackSourcePaths: true
      },
      angularCli: {
        environment: 'dev'
      },
      reporters: config.angularCli &amp;&amp; config.angularCli.codeCoverage
                ? ['progress', 'coverage-istanbul']
                : ['progress', 'kjhtml'],
      port: 9876,
      colors: true,
      logLevel: config.LOG_INFO,
      autoWatch: true,
      browsers: ['Chrome'],
      singleRun: false
    });
  };
  </code></pre>