Skip to content

Commit

Permalink
Fix coverage reporting only for src
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexKVal committed Jun 20, 2015
1 parent 903b5d1 commit 91a8ce8
Showing 1 changed file with 21 additions and 2 deletions.
23 changes: 21 additions & 2 deletions webpack/test-coverage.config.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,31 @@
import _ from 'lodash';
import path from 'path';
import { jsLoader } from './base.config';
import testConfig from './test.config';

const paths = {
SRC: path.resolve('src'),
TEST: path.resolve('test'),
TOOLS: path.resolve('tools') // for tools/public-components.js
};

export default _.extend({}, testConfig, {
module: {
loaders: [
{ test: /\.js/, loader: `${jsLoader}!isparta`, exclude: /node_modules|test[\/\\]/ },
{ test: /\.js/, loader: jsLoader, include: /test[\/\\]/ }
{
test: /\.js/,
include: [paths.SRC, paths.TEST, paths.TOOLS],
loader: jsLoader,
exclude: /node_modules/
}
],
preLoaders: [
{
test: /\.js/,
loader: 'isparta',
include: paths.SRC,
exclude: /node_modules/
}
]
}
});

0 comments on commit 91a8ce8

Please sign in to comment.