Skip to content

Question: How do you exclude a module from code coverage when running unit tests? #4958

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

Closed
daBishMan opened this issue Feb 23, 2017 · 4 comments

Comments

@daBishMan
Copy link

Please provide us with the following information:

OS?

Windows 10.

Versions.

@angular/cli: 1.0.0-beta.32.3
node: 7.5.0
os: win32 x64
@angular/common: 2.4.8
@angular/compiler: 2.4.8
@angular/compiler-cli: 2.4.8
@angular/core: 2.4.8
@angular/forms: 2.4.8
@angular/http: 2.4.8
@angular/platform-browser: 2.4.8
@angular/platform-browser-dynamic: 2.4.8
@angular/platform-server: 2.4.8
@angular/router: 3.4.8
@angular/cli: 1.0.0-beta.32.3

Repro steps.

I am trying to exclude files from code coverage results.

The log given by the failure.

no failures.

Mention any other details that might be useful.

We have code that we would like to exclude from code coverage when running unit tests.


Thanks! We'll be in touch soon.

@delasteve
Copy link
Contributor

When RC is released you will be able to configure the following section in the .angular-cli.json file:

"test": {
  "codeCoverage": {
    "exclude": ["glob/to/ignore"]
  },
  ...
}

@hansl
Copy link
Contributor

hansl commented Feb 23, 2017

Fixed in master by #4966

@hansl hansl closed this as completed Feb 23, 2017
@daBishMan
Copy link
Author

Thank you so much for your update. I will wait on RC.

Thanks for all your hard work.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants