karma.config.js 845 B

12345678910111213141516171819202122232425262728293031323334
  1. module.exports = function (config) {
  2. config.set({
  3. frameworks: ['mocha'],
  4. // plugins: ['karma-webpack', 'karma-mocha', 'karma-chai-as-promised'],
  5. webpack: {
  6. // karma watches the test entry points
  7. // Do NOT specify the entry option
  8. // webpack watches dependencies
  9. // webpack configuration
  10. },
  11. preprocessors: {
  12. 'test/**/*.js': ['webpack'],
  13. 'radiomanifest.js': ['webpack']
  14. },
  15. files: [
  16. 'radiomanifest.js',
  17. 'test/**/*.js'
  18. ],
  19. reporters: ['progress'],
  20. port: 9876, // karma web server port
  21. colors: true,
  22. logLevel: config.LOG_INFO,
  23. browsers: ['ChromeHeadless', 'FirefoxHeadless'],
  24. autoWatch: false,
  25. concurrency: Infinity,
  26. customLaunchers: {
  27. FirefoxHeadless: {
  28. base: 'Firefox',
  29. flags: ['-headless']
  30. }
  31. }
  32. })
  33. }