-
Notifications
You must be signed in to change notification settings - Fork 12k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ignore files/folders from code coverage report #3356
Comments
Just wanted to make sure you all know that upgrading your project to karma-remap-istanbul:^0.3.0 will allow you to use their exclude property. |
I just tried installing karma-remap-istanbul:^0.3.0 and karma-remap-istanbul:^0.4.0 with no luck at all. karma.conf.js: Versions: Thanks in advance for any ideas or help? |
@Nestor forgive me but I just want to be sure that you:
Not totally sure myself how the string implementation works but if everything else checks maybe switch to regex? HTH |
Hi, @dpmorrow, answers follow:
After some research look like istanbul generate the LCOV file depending on the platform which add a platfom dependen matching which a worked around using a regexp accepting slash and backslash as separator. Will need some time to fork istanbul repo and test it under windows locally. |
When RC is released you will be able to configure the following section in the "test": {
"codeCoverage": {
"exclude": ["glob/to/ignore"]
},
...
} |
Fixed in master by #4966 |
With the latest CLI 6+ add excluded files or paths to angular.json -> test -> options like so:
I should add, this addition was found by going through the schema
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
OS?
Versions.
angular-cli: 1.0.0-beta.19-3
node: 5.10.1
os: win32 x64
Repro steps.
The log given by the failure.
Mention any other details that might be useful.
Is there any way to exclude files/folders from test coverage (other than naming them .spec.ts)?
For example if I wanted to put some reusable bits of test code in src/app/common/testing/* I wouldn't want files included in this directory to be reported on.
Thanks!
The text was updated successfully, but these errors were encountered: