title: Angular-cli test coverage all files
body: <p>I am running the following command to unit test and generate code code coverage report.</p>
  
  <pre><code>ng test --code-coverage
  </code></pre>
  
  <p>It is  writing code coverage report in coverage folder.</p>
  
  <p>I need to see the coverage of the whole project and not just the file for which there are tests.</p>
  
  <p>karma.conf.js</p>
  
  <pre><code>module.exports = function (config) {
    config.set({
      basePath: '',
      frameworks: ['jasmine', 'angular-cli'],
      plugins: [
        require('karma-jasmine'),
        require('karma-jasmine-html-reporter'),
        require('karma-chrome-launcher'),
        require('karma-remap-istanbul'),
        require('angular-cli/plugins/karma'),
        require('karma-coverage'),
        require('karma-sourcemap-loader')
  
      ],
      files: [
        { pattern: './src/test.ts', watched: false }
      ],
      preprocessors: {
        './src/test.ts': ['angular-cli']
      },
      mime: {
        'text/x-typescript': ['ts','tsx']
      },
      remapIstanbulReporter: {
          reports: {
            html: 'coverage',
          lcovonly: './coverage/coverage.lcov'
        }
      },
      angularCli: {
        config: './angular-cli.json',
        environment: 'dev'
      },
      reporters: config.angularCli &amp;&amp; config.angularCli.codeCoverage
                ? ['progress', 'karma-remap-istanbul']
                : ['progress', 'kjhtml'],
      coverageReporter: {
        includeAllSources: true
      },
      port: 9876,
      colors: true,
      logLevel: config.LOG_INFO,
      autoWatch: true,
      browsers: ['Chrome'],
      singleRun: false
    });
  };
  </code></pre>