Underlining not working and values seem to not be updating
Opened this issue · 0 comments
timothyblue commented
Using Angular 11 with the standard Karma tool that comes with the CLI.
I added the lcovonly reporter to the Karma config
coverageReporter: {
dir: require('path').join(__dirname, './coverage'),
subdir: '.',
reporters: [{ type: 'html' }, { type: 'text-summary' }, { type: 'lcovonly' }]
},
I have codeCoverage activated in my angular.js file
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "src/test.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.spec.json",
"karmaConfig": "karma.conf.js",
"codeCoverage": true
}
}
I am running my tests using ng test
Also, the main file I am testing shows "Coverage: 32/37 lines". I added 4 basic public methods:
public testing(): void {
console.log('here');
}
Deleted my coverage folder and re-ran the tests and that number did not change. I even tried closing the file and re-opening it to no avail. I have discovered that if I close VS Code and re-open it, the values change to ""Coverage: 32/40 lines"
But I never see any underlining.
I even tried ng test --no-watch --code-coverage --source-map
with no difference.
Any thoughts?