karma.conf.js 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. module.exports = function (config) {
  2. config.set({
  3. frameworks: ["mocha", "sinon-chai"],
  4. // files: ["test/**/*.js"],
  5. files: ["test.js"],
  6. preprocessors: {
  7. "test.js": ["rollup"],
  8. },
  9. rollupPreprocessor: {
  10. /**
  11. * This is just a normal Rollup config object,
  12. * except that `input` is handled for you.
  13. */
  14. plugins: [require("rollup-plugin-html")()],
  15. output: {
  16. // format: 'iife', // Helps prevent naming collisions.
  17. // name: '<your_project>', // Required for 'iife' format.
  18. // sourcemap: 'inline', // Sensible for testing.
  19. },
  20. },
  21. reporters: ["spec"],
  22. specReporter: {
  23. maxLogLines: 5, // limit number of lines logged per test
  24. suppressErrorSummary: false, // do not print error summary
  25. suppressFailed: false, // do not print information about failed tests
  26. suppressPassed: false, // do not print information about passed tests
  27. suppressSkipped: true, // do not print information about skipped tests
  28. showSpecTiming: false, // print the time elapsed for each spec
  29. failFast: true, // test would finish with error when a first fail occurs.
  30. },
  31. port: 9876, // karma web server port
  32. colors: true,
  33. logLevel: config.LOG_INFO,
  34. browsers: ["ChromeHeadless"],
  35. autoWatch: false,
  36. // singleRun: false, // Karma captures browsers, runs the tests and exits
  37. concurrency: Infinity,
  38. });
  39. };