karma.conf.js 1.0 KB

12345678910111213141516171819202122232425262728293031
  1. // Karma configuration file, see link for more information
  2. // https://karma-runner.github.io/1.0/config/configuration-file.html
  3. module.exports = function (config) {
  4. config.set({
  5. basePath: '',
  6. frameworks: ['jasmine'],
  7. plugins: [
  8. require('karma-jasmine'),
  9. require('karma-chrome-launcher'),
  10. require('karma-jasmine-html-reporter'),
  11. require('karma-coverage-istanbul-reporter'),
  12. ],
  13. client: {
  14. clearContext: false, // leave Jasmine Spec Runner output visible in browser
  15. },
  16. coverageIstanbulReporter: {
  17. dir: require('path').join(__dirname, '../../coverage/site'),
  18. reports: ['html', 'lcovonly', 'text-summary'],
  19. fixWebpackSourcePaths: true,
  20. },
  21. reporters: ['progress', 'kjhtml'],
  22. port: 9876,
  23. colors: true,
  24. logLevel: config.LOG_INFO,
  25. autoWatch: true,
  26. browsers: ['Chrome'],
  27. singleRun: false,
  28. restartOnFileChange: true,
  29. });
  30. };