karma coverage istanbul reporter deprecated

Solutions on MaxInterview for karma coverage istanbul reporter deprecated by the best coders in the world

showing results for - "karma coverage istanbul reporter deprecated"
Emerald
06 Sep 2020
1module.exports = function (config) {
2  config.set({
3    basePath: '',
4    frameworks: ['jasmine', '@angular-devkit/build-angular'],
5    plugins: [
6      require('karma-jasmine'),
7      require('karma-chrome-launcher'),
8      require('karma-jasmine-html-reporter'),
9      require('karma-coverage'), // NEWLY ADDED
10      // ORIGINALLY HERE NOW REMOVED require('karma-coverage-istanbul-reporter'),
11      require('@angular-devkit/build-angular/plugins/karma')
12    ],
13    client: {
14      clearContext: false // leave Jasmine Spec Runner output visible in browser
15    },
16    reporters: ['progress', 'kjhtml', 'coverage'],
17    // coverageIstanbulReporter NO LONGER HERE
18    //coverageIstanbulReporter: {
19    //  dir: require('path').join(__dirname, '../../coverage/my-app'),
20    //  reports: ['html', 'lcovonly', 'text-summary'],
21    //  fixWebpackSourcePaths: true
22    //},
23    // coverReporter NEWLY ADDED
24    coverageReporter: {
25      dir: 'build/reports/coverage',
26      reporters: [
27        { type: 'html', subdir: 'report-html' },
28        { type: 'lcov', subdir: 'report-lcov' }
29      ]
30    },
31    // THE FOLLOWING REMAINED AS IS
32    port: 9876,
33    colors: true,
34    logLevel: config.LOG_INFO,
35    autoWatch: true,