You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

51 lines
1.7 KiB

  1. // Karma configuration
  2. module.exports = function(config) {
  3. var absolute_root = process.cwd() + '/';
  4. config.set({
  5. // frameworks to use
  6. // available frameworks: https://npmjs.org/browse/keyword/karma-adapter
  7. frameworks: ['jasmine-ajax', 'jasmine'],
  8. // list of files / patterns to load in the browser
  9. files: [
  10. {pattern: absolute_root + 'js/vendor/jquery/dist/jquery.js', included: true},
  11. //{pattern: absolute_root + 'js/**[!vendor]/*[!spec].js', included: true},
  12. {pattern: absolute_root + 'js/**[!vendor]/*_spec.js', included: true},
  13. ],
  14. usePolling: true,
  15. // list of files to exclude
  16. exclude: [],
  17. // preprocess matching files before serving them to the browser
  18. // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
  19. preprocessors: {
  20. 'app/client/js/**[!vendor]/*[!spec].js': ['coverage']
  21. },
  22. // test results reporter to use
  23. // possible values: 'dots', 'progress'
  24. // available reporters: https://npmjs.org/browse/keyword/karma-reporter
  25. reporters: ['progress', 'coverage'],
  26. coverageReporter: {
  27. type: 'lcov',
  28. dir: 'coverage/'
  29. },
  30. // web server port
  31. port: 9876,
  32. // enable / disable colors in the output (reporters and logs)
  33. colors: true,
  34. // level of logging
  35. // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
  36. logLevel: config.LOG_INFO,
  37. // enable / disable watching file and executing tests whenever any file changes
  38. autoWatch: true,
  39. // start these browsers
  40. // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
  41. browsers: ['PhantomJS'],
  42. // Continuous Integration mode
  43. // if true, Karma captures browsers, runs the tests and exits
  44. singleRun: false
  45. });
  46. };