karma.conf.js 890 B

123456789101112131415161718192021222324252627282930313233343536
  1. var webpackConfig = require('../../build/cooking.test');
  2. // no need for app entry during tests
  3. delete webpackConfig.entry;
  4. module.exports = function(config) {
  5. config.set({
  6. // to run in additional browsers:
  7. // 1. install corresponding karma launcher
  8. // http://karma-runner.github.io/0.13/config/browsers.html
  9. // 2. add it to the `browsers` array below.
  10. browsers: ['PhantomJS'],
  11. frameworks: ['mocha', 'sinon-chai'],
  12. reporters: ['spec', 'coverage'],
  13. files: ['./index.js'],
  14. preprocessors: {
  15. './index.js': ['webpack', 'sourcemap']
  16. },
  17. webpack: webpackConfig,
  18. webpackMiddleware: {
  19. noInfo: true
  20. },
  21. coverageReporter: {
  22. dir: './coverage',
  23. reporters: [
  24. { type: 'lcov', subdir: '.' },
  25. { type: 'text-summary' }
  26. ]
  27. },
  28. client: {
  29. mocha: {
  30. timeout: 4000
  31. }
  32. }
  33. });
  34. };