karma.conf.js 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /* eslint indent: [2, 4] */
  2. module.exports = function karmaExports(config) {
  3. "use strict";
  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": ['qunit'],
  10. // list of files / patterns to load in the browser
  11. "files": [
  12. 'x2js.js',
  13. 'tests*.js'
  14. ],
  15. // list of files to exclude
  16. "exclude": [
  17. ],
  18. // preprocess matching files before serving them to the browser
  19. // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
  20. "preprocessors": {
  21. },
  22. // test results reporter to use
  23. // possible values: 'dots', 'progress'
  24. // available reporters: https://npmjs.org/browse/keyword/karma-reporter
  25. // 'progress' reports wrong totals on Travis CI, so just use dots
  26. "reporters": ['dots'],
  27. // web server port
  28. "port": 9876,
  29. // enable / disable colors in the output (reporters and logs)
  30. "colors": true,
  31. // level of logging
  32. // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
  33. "logLevel": config.LOG_INFO,
  34. // enable / disable watching file and executing tests whenever any file changes
  35. "autoWatch": true,
  36. // start these browsers
  37. // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
  38. "browsers": ['Chrome', 'IE', 'Firefox'],
  39. // Continuous Integration mode
  40. // if true, Karma captures browsers, runs the tests and exits
  41. "singleRun": false,
  42. // Concurrency level
  43. // how many browser should be started simultanous
  44. "concurrency": Infinity
  45. });
  46. };