karma-jquery.conf.js 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. module.exports = function (config) {
  2. 'use strict';
  3. config.set({
  4. frameworks: ['jasmine'],
  5. plugins: [
  6. 'karma-jasmine',
  7. 'karma-phantomjs-launcher',
  8. 'karma-coverage'
  9. ],
  10. files: [
  11. 'bower_components/jquery/jquery.min.js',
  12. 'bower_components/rangy/rangy-core.js',
  13. 'bower_components/rangy/rangy-selectionsaverestore.js',
  14. 'bower_components/angular/angular.min.js',
  15. 'bower_components/angular-mocks/angular-mocks.js',
  16. 'dist/textAngular-sanitize.js',
  17. 'dist/textAngularSetup.js',
  18. 'dist/textAngular.js',
  19. 'test/helpers.js',
  20. 'test/**/*.spec.js'
  21. ],
  22. // list of files to exclude
  23. exclude: [
  24. ],
  25. preprocessors: {
  26. 'dist/textAngular.js': ['coverage'],
  27. 'dist/textAngularSetup.js': ['coverage']
  28. },
  29. // test results reporter to use
  30. // possible values: 'dots', 'progress', 'junit'
  31. reporters: ['progress', 'coverage'],
  32. coverageReporter: {
  33. reporters: [
  34. {type: 'json', dir: 'coverage'},
  35. {type: 'lcov', dir: 'coverage'}
  36. ]
  37. },
  38. // web server port
  39. port: 9876,
  40. // cli runner port
  41. runnerPort: 9100,
  42. // enable / disable colors in the output (reporters and logs)
  43. colors: true,
  44. // level of logging
  45. // possible values: LOG_DISABLE || LOG_ERROR || LOG_WARN || LOG_INFO || LOG_DEBUG
  46. logLevel: config.LOG_INFO,
  47. // enable / disable watching file and executing tests whenever any file changes
  48. autoWatch: false,
  49. // Start these browsers, currently available:
  50. // - Chrome
  51. // - ChromeCanary
  52. // - Firefox
  53. // - Opera
  54. // - Safari (only Mac)
  55. // - PhantomJS
  56. // - IE (only Windows)
  57. browsers: ['PhantomJS'],
  58. // If browser does not capture in given timeout [ms], kill it
  59. captureTimeout: 60000,
  60. // Continuous Integration mode
  61. // if true, it capture browsers, run tests and exit
  62. singleRun: true
  63. });
  64. };