Skip to content

Commit 79d283d

Browse files
committed
Update karma.conf.js template from Angular 11
1 parent a5d6e2a commit 79d283d

2 files changed

Lines changed: 20 additions & 8 deletions

File tree

src/application/files/karma.conf.js.template

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ module.exports = function (config) {
99
require('karma-jasmine'),
1010
require('karma-chrome-launcher'),
1111
require('karma-jasmine-html-reporter'),
12-
require('karma-coverage-istanbul-reporter'),
12+
require('karma-coverage'),
1313
require('karma-spec-reporter'),
1414
require('@angular-devkit/build-angular/plugins/karma')
1515
],
@@ -19,10 +19,16 @@ module.exports = function (config) {
1919
failSpecWithNoExpectations: true
2020
}
2121
},
22-
coverageIstanbulReporter: {
22+
jasmineHtmlReporter: {
23+
suppressAll: true // removes the duplicated traces
24+
},
25+
coverageReporter: {
2326
dir: require('path').join(__dirname, '<%= relativePathToWorkspaceRoot %>/coverage/<%= appName%>'),
24-
reports: ['html', 'lcovonly', 'text-summary'],
25-
fixWebpackSourcePaths: true,
27+
subdir: '.',
28+
reporters: [
29+
{ type: 'html' },
30+
{ type: 'text-summary' }
31+
],
2632
thresholds: {
2733
emitWarning: false,
2834
global: {

src/library/files/karma.conf.js.template

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ module.exports = function (config) {
99
require('karma-jasmine'),
1010
require('karma-chrome-launcher'),
1111
require('karma-jasmine-html-reporter'),
12-
require('karma-coverage-istanbul-reporter'),
12+
require('karma-coverage'),
1313
require('karma-spec-reporter'),
1414
require('@angular-devkit/build-angular/plugins/karma')
1515
],
@@ -19,10 +19,16 @@ module.exports = function (config) {
1919
failSpecWithNoExpectations: true
2020
}
2121
},
22-
coverageIstanbulReporter: {
22+
jasmineHtmlReporter: {
23+
suppressAll: true // removes the duplicated traces
24+
},
25+
coverageReporter: {
2326
dir: require('path').join(__dirname, '<%= relativePathToWorkspaceRoot %>/coverage/<%= appName%>'),
24-
reports: ['html', 'lcovonly', 'text-summary'],
25-
fixWebpackSourcePaths: true,
27+
subdir: '.',
28+
reporters: [
29+
{ type: 'html' },
30+
{ type: 'text-summary' }
31+
],
2632
thresholds: {
2733
emitWarning: false,
2834
global: {

0 commit comments

Comments
 (0)