karma.conf.js 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. // Karma configuration
  2. // Generated on Mon Aug 24 2015 10:10:09 GMT+0000 (UTC)
  3. module.exports = function(config) {
  4. config.set({
  5. // base path that will be used to resolve all patterns (eg. files, exclude)
  6. basePath: '',
  7. // frameworks to use
  8. // available frameworks: https://npmjs.org/browse/keyword/karma-adapter
  9. frameworks: ['jasmine', 'mocha', 'chai'],
  10. // list of files / patterns to load in the browser
  11. files: [
  12. 'public/libs/angular/angular.js',
  13. 'public/libs/angular-route/angular-route.js',
  14. 'public/libs/angular-cookies/angular-cookies.js',
  15. 'public/libs/angular-mocks/angular-mocks.js',
  16. 'public/js/**/*.js',
  17. 'public/**/*.controller.js',
  18. 'test/**/*.controller.js'
  19. ],
  20. // list of files to exclude
  21. exclude: [
  22. ],
  23. // preprocess matching files before serving them to the browser
  24. // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
  25. preprocessors: {
  26. },
  27. // test results reporter to use
  28. // possible values: 'dots', 'progress'
  29. // available reporters: https://npmjs.org/browse/keyword/karma-reporter
  30. reporters: ['progress', 'coverage', 'coveralls'],
  31. coverageReporter: {
  32. type: 'lcov', // lcov or lcovonly are required for generating lcov.info files
  33. dir: 'coverage/'
  34. },
  35. // web server port
  36. port: 9876,
  37. // enable / disable colors in the output (reporters and logs)
  38. colors: true,
  39. // level of logging
  40. // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
  41. logLevel: config.LOG_INFO,
  42. // enable / disable watching file and executing tests whenever any file changes
  43. autoWatch: true,
  44. // start these browsers
  45. // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
  46. browsers: ['PhantomJS'],
  47. // Continuous Integration mode
  48. // if true, Karma captures browsers, runs the tests and exits
  49. singleRun: true
  50. })
  51. }