Skip to content

Commit c67c4e9

Browse files
authored
Add test coverage requirements (#285)
1 parent aec7488 commit c67c4e9

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

angular.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@
144144
"builder": "@angular-devkit/build-angular:karma",
145145
"options": {
146146
"main": "projects/angular-cld/src/test.ts",
147+
"codeCoverage": true,
147148
"tsConfig": "projects/angular-cld/tsconfig.spec.json",
148149
"karmaConfig": "projects/angular-cld/karma.conf.js"
149150
}

projects/angular-cld/karma.conf.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,13 @@ module.exports = function (config) {
1919
coverageIstanbulReporter: {
2020
dir: require('path').join(__dirname, '../../coverage'),
2121
reports: ['html', 'lcovonly'],
22-
fixWebpackSourcePaths: true
22+
fixWebpackSourcePaths: true,
23+
thresholds: {
24+
statements: 80,
25+
lines: 80,
26+
branches: 80,
27+
functions: 80
28+
}
2329
},
2430
reporters: ['progress', 'kjhtml'],
2531
port: 9876,

0 commit comments

Comments
 (0)