Skip to content

Commit d00bdfb

Browse files
committed
prepare karma-tests with needed test-coverage reports
1 parent 28cceb4 commit d00bdfb

3 files changed

Lines changed: 7 additions & 3 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,4 @@ testem.log
4040
# System files
4141
.DS_Store
4242
Thumbs.db
43+
/.angular/

karma.conf.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,13 @@ module.exports = function (config) {
2323
suppressAll: true // removes the duplicated traces
2424
},
2525
coverageReporter: {
26-
dir: require('path').join(__dirname, './coverage/angular-playwright-coverage'),
26+
dir: require('path').join(__dirname, 'coverage', 'karma'),
2727
subdir: '.',
2828
reporters: [
29+
{ type: 'lcovonly', subdir: '.', file: 'coverage-karma.lcov.info'}, // not realy needed. generated after merge with playwright
2930
{ type: 'html' },
30-
{ type: 'text-summary' }
31+
{ type: 'json', subdir: '.', file: 'coverage-karma.json'}, // used for merge with playwright-coverage
32+
{ type: 'text-summary' },
3133
]
3234
},
3335
reporters: ['progress', 'kjhtml'],

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
"start": "ng serve",
77
"build": "ng build",
88
"watch": "ng build --watch --configuration development",
9-
"test": "ng test"
9+
"test": "ng test --browsers ChromeHeadless --watch false --code-coverage=true",
10+
"test:watch": "ng test --watch true"
1011
},
1112
"prettier": {
1213
"printWidth": 100,

0 commit comments

Comments
 (0)