2016-11-08 6 views
0

Webpack + Typescript + Karmaという単純なアプリケーションを作成しましたが、コードカバレッジが正しく機能するようになっています。提供thisおよびその他の情報のようなプロジェクトごとhereあなたは...私が試したTypescript + Webpack + Istanbul-Instrumenterのカルマへのコードカバレッジを追加するには

// In test bundle 
const componentsContext = require.context('../src/', true, /\.js$/); 
componentsContext.keys().forEach(componentsContext); 

// In webpack config 
const helpers = require('./helpers.js') 
const webpackMerge = require('webpack-merge'); // used to merge webpack configs 
const commonConfig = require('./webpack.common.js'); // the settings that are common to prod and dev 
const HtmlWebpackPlugin = require('html-webpack-plugin'); 
module.exports = function() { 
    return webpackMerge(commonConfig(), { 
    devtool: 'inline-source-map', 
    output: { 
     path: helpers.root("dist"), 
     filename: '[name].bundle.js', 
    }, 
    module: { 
     postLoaders: [ 
     { 
      test: /^((?!\.spec\.ts).)*.ts$/, 
      exclude: /(node_modules|bower_components)/, 
      loader: 'istanbul-instrumenter' 
     } 
     ] 
    } 
    }) 
}; 

を見ることはできませんが、私はkarma start test/karma.conf.jsを実行したときに、私は100%を確認し、リストされたどのファイル。私は何が欠けていますか?

答えて

関連する問題