• Support es6 syntax detection and its coverage

    • npm install karma-coverage-istanbul-instrumenter karma-coverage-istanbul-reporter -D

    • karma.conf.js

      preprocessors: {
          'webapp/controller/*.js': ['karma-coverage-istanbul-instrumenter'] // Recognize the ES6 syntax for these files
      },
      coverageIstanbulInstrumenter: {
          esModules: false
      },
      reporters: ['progress'.'coverage-istanbul'].coverageIstanbulReporter: {
          dir: './target/coverage'.includeAllSources: true.Cobertura will generate coverage reports for HTML files
          reports: ['cobertura'.'lcovonly'.'text-summary']},plugins: ['karma-*']
      Copy the code