webpack-cov.conf.js 452 B

12345678910111213141516171819202122
  1. var path = require('path');
  2. module.exports = {
  3. entry: './test/build/index.js',
  4. output: {
  5. filename: './test/build/coverage.js'
  6. },
  7. bail: true,
  8. module: {
  9. loaders: [
  10. { test: /\.css$/, loader: 'style-loader!css-loader' },
  11. ],
  12. preLoaders: [
  13. // instrument only testing sources with Istanbul
  14. {
  15. test: /\.js$/,
  16. include: path.resolve('lib/'),
  17. loader: 'istanbul-instrumenter'
  18. }
  19. ]
  20. }
  21. }