karma.conf.js 902 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. // Karma configuration
  2. // Generated on Mon Jun 12 2017 12:01:58 GMT+0800 (CST)
  3. module.exports = function (config) {
  4. config.set({
  5. basePath: '',
  6. frameworks: ['mocha'],
  7. files: [
  8. 'test/*.js'
  9. ],
  10. exclude: [
  11. ],
  12. preprocessors: {
  13. 'test/map.js': ['webpack'],
  14. '*.js': ['coverage']
  15. },
  16. plugins: [
  17. 'karma-mocha',
  18. 'karma-coverage',
  19. 'karma-webpack'
  20. ],
  21. webpack: require('./build/webpack.test.config.js'),
  22. webpackMiddleware: {
  23. noInfo: true
  24. },
  25. coverageReporter: {
  26. type: 'html',
  27. dir: 'test/coverage/'
  28. },
  29. reporters: ['progress', 'coverage'],
  30. nightmareOptions: {
  31. width: 640,
  32. height: 480,
  33. show: false
  34. },
  35. port: 9876,
  36. colors: true,
  37. logLevel: config.LOG_INFO,
  38. autoWatch: false,
  39. browsers: [/*'Nightmare'*/],
  40. singleRun: true,
  41. concurrency: Infinity
  42. })
  43. }