karma.conf.js 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. module.exports = config => {
  2. config.set({
  3. // base path that will be used to resolve all patterns (eg. files, exclude)
  4. basePath: '',
  5. // frameworks to use
  6. // available frameworks: https://npmjs.org/browse/keyword/karma-adapter
  7. frameworks: ['mocha'],
  8. // list of files / patterns to load in the browser
  9. files: ['test/browser/index.js'],
  10. // list of files / patterns to exclude
  11. exclude: [],
  12. // preprocess matching files before serving them to the browser
  13. // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
  14. preprocessors: {},
  15. // test results reporter to use
  16. // possible values: 'dots', 'progress'
  17. // available reporters: https://npmjs.org/browse/keyword/karma-reporter
  18. reporters: ['dots'],
  19. // web server port
  20. port: 9876,
  21. // enable / disable colors in the output (reporters and logs)
  22. colors: true,
  23. // level of logging
  24. // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
  25. logLevel: config.LOG_INFO,
  26. // enable / disable watching file and executing tests whenever any file changes
  27. autoWatch: false,
  28. // start these browsers
  29. // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
  30. browsers: ['Chrome'],
  31. // Continuous Integration mode
  32. // if true, Karma captures browsers, runs the tests and exits
  33. singleRun: true,
  34. // Concurrency level
  35. // how many browser should be started simultaneous
  36. concurrency: Infinity,
  37. });
  38. };