karma.config.js 832 B

123456789101112131415161718192021222324252627282930
  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: ["radiomanifest.js", "test/**/*.js"],
  16. reporters: ["progress"],
  17. port: 9876, // karma web server port
  18. colors: true,
  19. logLevel: config.LOG_INFO,
  20. browsers: ["ChromeHeadless", "FirefoxHeadless"],
  21. autoWatch: false,
  22. concurrency: Infinity,
  23. customLaunchers: {
  24. FirefoxHeadless: {
  25. base: "Firefox",
  26. flags: ["-headless"],
  27. },
  28. },
  29. });
  30. };