提交 fcd2121c 编写于 作者: M mzabriskie

Fixing test coverage reporting

上级 4f732e8c
......@@ -15,7 +15,7 @@ module.exports = function(config) {
// list of files / patterns to load in the browser
files: [
'webpack.tests.js'
'test/specs/**/*.spec.js'
],
......@@ -28,17 +28,27 @@ module.exports = function(config) {
// preprocess matching files before serving them to the browser
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
preprocessors: {
'webpack.tests.js': ['webpack', 'sourcemap', 'coverage']
'test/specs/**/*.spec.js': ['webpack', 'sourcemap']
},
webpack: {
cache: true,
devtool: 'inline-source-map',
module: {
postLoaders: [
{
test: /\.js$/,
exclude: /(node_modules|test)/,
loader: 'istanbul-instrumenter'
}
]
},
externals: [
{
'./adapters/http': 'var undefined'
}
],
devtool: 'inline-source-map'
]
},
webpackServer: {
......
var context = require.context('./test/specs', true, /\.js$/);
context.keys().forEach(context);
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册