karma.conf.js 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. // Karma configuration
  2. // Generated on 2016-08-01
  3. module.exports = function(config) {
  4. 'use strict';
  5. config.set({
  6. // enable / disable watching file and executing tests whenever any file changes
  7. autoWatch: true,
  8. // base path, that will be used to resolve files and exclude
  9. basePath: '../',
  10. // testing framework to use (jasmine/mocha/qunit/...)
  11. // as well as any additional frameworks (requirejs/chai/sinon/...)
  12. frameworks: [
  13. 'jasmine'
  14. ],
  15. // list of files / patterns to load in the browser
  16. files: [
  17. // bower:js
  18. 'bower_components/jquery/dist/jquery.js',
  19. 'bower_components/angular/angular.js',
  20. 'bower_components/bootstrap/dist/js/bootstrap.js',
  21. 'bower_components/angular-animate/angular-animate.js',
  22. 'bower_components/angular-cookies/angular-cookies.js',
  23. 'bower_components/angular-resource/angular-resource.js',
  24. 'bower_components/angular-route/angular-route.js',
  25. 'bower_components/angular-sanitize/angular-sanitize.js',
  26. 'bower_components/angular-touch/angular-touch.js',
  27. 'bower_components/angular-mocks/angular-mocks.js',
  28. // endbower
  29. 'app/scripts/**/*.js',
  30. 'test/mock/**/*.js',
  31. 'test/spec/**/*.js'
  32. ],
  33. // list of files / patterns to exclude
  34. exclude: [
  35. ],
  36. // web server port
  37. port: 8080,
  38. // Start these browsers, currently available:
  39. // - Chrome
  40. // - ChromeCanary
  41. // - Firefox
  42. // - Opera
  43. // - Safari (only Mac)
  44. // - PhantomJS
  45. // - IE (only Windows)
  46. browsers: [
  47. 'PhantomJS'
  48. ],
  49. // Which plugins to enable
  50. plugins: [
  51. 'karma-phantomjs-launcher',
  52. 'karma-jasmine'
  53. ],
  54. // Continuous Integration mode
  55. // if true, it capture browsers, run tests and exit
  56. singleRun: false,
  57. colors: true,
  58. // level of logging
  59. // possible values: LOG_DISABLE || LOG_ERROR || LOG_WARN || LOG_INFO || LOG_DEBUG
  60. logLevel: config.LOG_INFO,
  61. // Uncomment the following lines if you are using grunt's server to run the tests
  62. // proxies: {
  63. // '/': 'http://localhost:9000/'
  64. // },
  65. // URL root prevent conflicts with the site root
  66. // urlRoot: '_karma_'
  67. });
  68. };