karma.conf.js 2.4 KB

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