karma.conf.js 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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. }],
  26. // preprocess matching files before serving them to the browser
  27. // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
  28. preprocessors: {
  29. 'test/data/*.xml': ['musicxml2js']
  30. },
  31. // test results reporter to use
  32. // possible values: 'dots', 'progress'
  33. // available reporters: https://npmjs.org/browse/keyword/karma-reporter
  34. reporters: ['mocha'],
  35. // web server port
  36. port: 9876,
  37. // enable / disable colors in the output (reporters and logs)
  38. colors: true,
  39. // level of logging
  40. // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
  41. logLevel: config.LOG_INFO,
  42. // enable / disable watching file and executing tests whenever any file changes
  43. autoWatch: false,
  44. // start these browsers
  45. // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
  46. browsers: [], // Will be overruled by karma grunt task options
  47. // Continuous Integration mode
  48. // if true, Karma captures browsers, runs the tests and exits
  49. singleRun: true,
  50. // Concurrency level
  51. // how many browser should be started simultaneous
  52. concurrency: Infinity
  53. });
  54. };