cover everything

This commit is contained in:
Kent C. Dodds 2016-06-27 07:32:09 -06:00
parent 2cf354c65f
commit 6bb1890932

View File

@ -2,20 +2,31 @@ process.env.BABEL_ENV = 'test'
const webpackEnv = {test: true}
const webpackConfig = require('./webpack.config.babel')(webpackEnv)
const fileGlob = 'src/**/*.test.js'
const testGlob = 'src/**/*.test.js'
const srcGlob = 'src/**/!(*.test|*.stub).js'
module.exports = config => {
config.set({
basePath: '',
frameworks: ['mocha', 'chai'],
files: [fileGlob],
files: [testGlob, srcGlob],
exclude: ['src/bootstrap.js'],
preprocessors: {
[fileGlob]: ['webpack']
[testGlob]: ['webpack'],
[srcGlob]: ['webpack'],
},
webpack: webpackConfig,
webpackMiddleware: {noInfo: true},
reporters: ['progress', 'coverage'],
coverageReporter: {
check: {
global: {
statements: 11,
branches: 0,
functions: 0,
lines: 11,
},
},
reporters: [
{type: 'lcov', dir: 'coverage/', subdir: '.'},
{type: 'json', dir: 'coverage/', subdir: '.'},