karma.conf.js 699 B

123456789101112131415161718192021222324252627282930
  1. var webpackConfig = require('./webpack.config.js');
  2. module.exports = function (karma) {
  3. karma.set({
  4. plugins: ['karma-webpack', 'karma-chai', 'karma-sinon', 'karma-mocha', 'karma-chrome-launcher'],
  5. frameworks: ['chai', 'sinon', 'mocha'],
  6. files: [
  7. 'src/**/*.js',
  8. 'test/**/*.js',
  9. ],
  10. preprocessors: {
  11. 'src/**/*.js': ['webpack'],
  12. 'test/**/*.js': ['webpack']
  13. },
  14. webpack: {
  15. module: webpackConfig.module,
  16. plugins: webpackConfig.plugins
  17. },
  18. webpackMiddleware: {
  19. stats: 'errors-only'
  20. },
  21. browsers: ['ChromeHeadless']
  22. });
  23. };