I am running the following command to unit test and generate code code coverage report.
ng test --code-coverage
It is working fine and writing code coverage report in coverage
folder.
In this I got all files and directory coverage report
But I want to exclude specific files/directory let say src/app/quote/services/generated
. How to do that?
With the latest CLI, inside angular.json
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "src/test.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.spec.json",
"karmaConfig": "./karma.conf.js",
"codeCoverageExclude": ["src/testing/**/*"],