title: Coverage reports with karma and a mix of javascript and typescript src files
body: <p>I have a project where I use webpack for development/testing and karma as my test runner.  This project has source files written half in js and half in ts/tsx.  The test suite is written completely in js.  I currently use karma-coverage, which shows coverage reports for all my js source files, but it does not support typescript files.  All my tests run, there is no problem there, I just would like coverage reports for all my test files.  Can anyone point me in the right direction?  </p>
  
  <p>Here is my karma.conf.js if this helps.</p>
  
  <pre><code>'use strict';
  
  const webpackCfg = require('./webpack.config')('test');
  
  module.exports = function karmaConfig(config) {
  
    config.set({
      browsers: ['Chrome'],
      files: [
        'test/loadtests.js'
      ],
      port: 8080,
      captureTimeout: 60000,
      frameworks: [
        'mocha',
        'chai',
        'sinon'
      ],
      client: {
        mocha: {}
      },
      singleRun: true,
      reporters: ['mocha', 'coverage', 'junit'],
      mochaReporter: {
        output: 'autowatch'
      },
      preprocessors: {
        'test/loadtests.js': ['webpack', 'sourcemap']
      },
      webpack: webpackCfg,
      webpackServer: {
        noInfo: true
      },
      junitReporter: {
        outputDir: 'coverage',
        outputFile: 'junit-result.xml',
        useBrowserName: false
      },
      coverageReporter: {
        dir: 'coverage/',
        watermarks: {
          statements: [70, 80],
          functions: [70, 80],
          branches: [70, 80],
          lines: [70, 80]
        },
        reporters: [
          { type: 'text' },
          {
            type: 'html',
            subdir: 'html'
          },
          {
            type: 'cobertura',
            subdir: 'cobertura'
          },
          {
            type: 'lcovonly',
            subdir: 'lcov'
          }
        ]
      }
    });
  };
  </code></pre>
  
  <p>And the relevant part of my webpack test config</p>
  
  <pre><code>  {
        devtool: 'inline-source-map',
        externals: {
          cheerio: 'window',
          'react/lib/ExecutionEnvironment': true,
          'react/addons': true,
          'react/lib/ReactContext': true,
        },
        module: {
          preLoaders: [
            {
              test: /\.(js|jsx)$/,
              loader: 'isparta-loader',
              include: [
                this.srcPathAbsolute
              ]
            }
          ],
          loaders: [
            {
              test: /\.cssmodule\.css$/,
              loaders: [
                'style',
                'css?modules&amp;importLoaders=1&amp;localIdentName=[name]-[local]-[hash:base64:5]'
              ]
            },
            {
              test: /^.((?!cssmodule).)*\.css$/,
              loader: 'null-loader'
            },
            {
              test: /\.(sass|scss|less|styl|png|jpg|gif|mp4|ogg|svg|woff|woff2)$/,
              loader: 'null-loader'
            },
            {
              test: /\.json$/,
              loader: 'json'
            },
            {
              test: /\.ts(x?)$/,
              exclude: /node_modules/,
              loader: ['babel', 'ts-loader']
            },
            {
              test: /\.(js|jsx)$/,
              loader: 'babel-loader',
              query: {
                presets: ['airbnb']
              },
              include: [].concat(
                this.includedPackages,
                [
                  this.srcPathAbsolute,
                  this.testPathAbsolute
                ]
              )
            }
          ]
        },
        plugins: [
          new webpack.DefinePlugin({
            'process.env.NODE_ENV': '"test"'
          })
        ]
      }
  </code></pre>