karma.conf.js 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. // Karma configuration
  2. // Generated on Fri Feb 05 2016 12:36:08 GMT+0100 (CET)
  3. /*globals module*/
  4. module.exports = function (config) {
  5. 'use strict';
  6. config.set({
  7. // base path that will be used to resolve all patterns (eg. files, exclude)
  8. basePath: '',
  9. // frameworks to use
  10. // available frameworks: https://npmjs.org/browse/keyword/karma-adapter
  11. frameworks: ['mocha', 'chai', 'fixture'],
  12. // list of files to exclude
  13. exclude: [],
  14. files: [{
  15. pattern: 'build/osmd-debug.js'
  16. }, {
  17. pattern: 'src/**/*.ts',
  18. included: false
  19. }, {
  20. pattern: 'test/**/*.ts',
  21. included: false
  22. }, {
  23. pattern: 'test/data/*.xml',
  24. included: true//,
  25. //served: true,
  26. //watched: true
  27. }],
  28. // preprocess matching files before serving them to the browser
  29. // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
  30. preprocessors: {
  31. 'test/data/*.xml': ['html2js']
  32. },
  33. // test results reporter to use
  34. // possible values: 'dots', 'progress'
  35. // available reporters: https://npmjs.org/browse/keyword/karma-reporter
  36. reporters: ['mocha'],
  37. // web server port
  38. port: 9876,
  39. // enable / disable colors in the output (reporters and logs)
  40. colors: true,
  41. // level of logging
  42. // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
  43. logLevel: config.LOG_INFO,
  44. // enable / disable watching file and executing tests whenever any file changes
  45. autoWatch: false,
  46. // start these browsers
  47. // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
  48. browsers: [], // Will be overruled by karma grunt task options
  49. // Continuous Integration mode
  50. // if true, Karma captures browsers, runs the tests and exits
  51. singleRun: true,
  52. // Concurrency level
  53. // how many browser should be started simultaneous
  54. concurrency: Infinity
  55. });
  56. };