karma.conf.js 1.1 KB

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