theRemix

karma.conf.js

Oct 19th, 2022
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.31 KB | None | 0 0
  1. // Karma configuration file, see link for more information
  2. // https://karma-runner.github.io/1.0/config/configuration-file.html
  3.  
  4. module.exports = function (config) {
  5. const configuration = {
  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('karma-coverage-istanbul-reporter'),
  13. require('@angular-devkit/build-angular/plugins/karma')
  14. ],
  15. client:{
  16. clearContext: false, // leave Jasmine Spec Runner output visible in browser
  17. jasmine: {
  18. random: false
  19. }
  20. },
  21. coverageIstanbulReporter: {
  22. dir: require('path').join(__dirname, 'coverage'), reports: [ 'html', 'lcovonly' ],
  23. fixWebpackSourcePaths: true
  24. },
  25. angularCli: {
  26. environment: 'dev'
  27. },
  28. reporters: ['progress', 'kjhtml'],
  29. port: 9876,
  30. colors: true,
  31. logLevel: config.LOG_INFO,
  32. autoWatch: true,
  33. browsers: ['Chrome'],
  34. customLaunchers: {
  35. Chrome_travis_ci: {
  36. base: 'Chrome',
  37. flags: ['--no-sandbox']
  38. }
  39. },
  40. singleRun: false
  41. };
  42.  
  43. if (process.env.TRAVIS) {
  44. configuration.browsers = ['Chrome_travis_ci'];
  45. }
  46.  
  47. config.set(configuration);
  48. };
Advertisement
Add Comment
Please, Sign In to add comment