karma.conf.js 2.1 KB

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