title: Setting up unit test code coverage on Angular 2.1.0 Webpack
body: <p>I am Following <a href="https://angular.io/docs/ts/latest/guide/webpack.html" rel="nofollow">this tutorial</a> on setting up a Webpack Angular 2 project.</p>
  
  <p>I can run unit tests just fine with the setup, but I have tried adding code coverage to the project using karma-coverage and remap-istanbul, but it seems that karma-coverage is not outputting anything in the coverage-final.json.</p>
  
  <p>What do I need to add to the karma config to get the test config to work?</p>
  
  <p>Here is my current config:</p>
  
  <pre><code>var webpackConfig = require('./webpack.test');
  
  module.exports = function (config) {
      var _config = {
          basePath: '',
  
          frameworks: ['jasmine'],
  
          files: [
            {pattern: './config/karma-test-shim.js', watched: false}
          ],
  
          preprocessors: {
              './config/karma-test-shim.js': ['webpack', 'sourcemap']
          },
  
          webpack: webpackConfig,
  
          webpackMiddleware: {
              stats: 'errors-only'
          },
  
          webpackServer: {
              noInfo: true
          },
  
          reporters: ['progress'],
          port: 9876,
          colors: true,
          logLevel: config.LOG_INFO,
          autoWatch: false,
          browsers: ['PhantomJS'],
          singleRun: true
      };
  
      config.set(_config);
  };
  </code></pre>