0
0

karma.conf.js 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. // Karma configuration
  2. // Generated on Wed Aug 17 2016 00:01:09 GMT+0200 (Mitteleuropäische Sommerzeit)
  3. module.exports = function(config) {
  4. var configuration = {
  5. // base path that will be used to resolve all patterns (eg. files, exclude)
  6. basePath: '',
  7. // plugins starting with karma- are autoloaded
  8. plugins: ['karma-chrome-launcher', 'karma-jasmine'],
  9. // frameworks to use
  10. // available frameworks: https://npmjs.org/browse/keyword/karma-adapter
  11. frameworks: ['jasmine'],
  12. // list of files / patterns to load in the browser
  13. files: [
  14. '../docs/js/jquery-2.1.3.min.js', // dirty hack for including jQuery
  15. 'http://knockoutjs.com/downloads/knockout-3.4.0.debug.js',
  16. '../dist/js/bootstrap-multiselect.js',
  17. 'spec/*.js'
  18. ],
  19. // list of files to exclude
  20. exclude: [
  21. ],
  22. // preprocess matching files before serving them to the browser
  23. // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
  24. preprocessors: {
  25. },
  26. // test results reporter to use
  27. // possible values: 'dots', 'progress'
  28. // available reporters: https://npmjs.org/browse/keyword/karma-reporter
  29. reporters: ['progress'],
  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: ['Chrome', 'ChromeCanary', 'Firefox', 'Opera', 'IE'],
  42. // e.g see https://swizec.com/blog/how-to-run-javascript-tests-in-chrome-on-travis/swizec/6647
  43. customLaunchers: {
  44. Chrome_travis_ci: {
  45. base: 'Chrome',
  46. flags: ['--no-sandbox']
  47. }
  48. },
  49. // Continuous Integration mode
  50. // if true, Karma captures browsers, runs the tests and exits
  51. singleRun: false,
  52. // Concurrency level
  53. // how many browser should be started simultaneous
  54. concurrency: Infinity
  55. };
  56. if (process.env.TRAVIS) {
  57. configuration.browsers = ['Chrome_travis_ci'];
  58. }
  59. config.set(configuration);
  60. }