karma.conf.js.template 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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'<% if (needDevkitPlugin) { %>, '@angular-devkit/build-angular'<% } %>],
  7. plugins: [
  8. require('karma-jasmine'),
  9. require('karma-chrome-launcher'),
  10. require('karma-jasmine-html-reporter'),
  11. require('karma-coverage'),<% if (needDevkitPlugin) { %>
  12. require('@angular-devkit/build-angular/plugins/karma')<% } %>
  13. ],
  14. client: {
  15. jasmine: {
  16. // you can add configuration options for Jasmine here
  17. // the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html
  18. // for example, you can disable the random execution with `random: false`
  19. // or set a specific seed with `seed: 4321`
  20. },
  21. },
  22. jasmineHtmlReporter: {
  23. suppressAll: true // removes the duplicated traces
  24. },
  25. coverageReporter: {
  26. dir: require('path').join(__dirname, '<%= relativePathToWorkspaceRoot %>/coverage/<%= folderName %>'),
  27. subdir: '.',
  28. reporters: [
  29. { type: 'html' },
  30. { type: 'text-summary' }
  31. ]
  32. },
  33. reporters: ['progress', 'kjhtml'],
  34. browsers: ['Chrome'],
  35. restartOnFileChange: true
  36. });
  37. };