karma.conf.js 2.2 KB

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