Skip to content

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

Closed

Description

@daBishMan

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.

Activity

  1. delasteve commented on Feb 23, 2017

    @delasteve
    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"]
      },
      ...
    }
  2. hansl commented on Feb 23, 2017

    @hansl
    Contributor

    Fixed in master by #4966

  3. daBishMan commented on Feb 23, 2017

    @daBishMan
    Author

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

    Thanks for all your hard work.

  4. angular-automatic-lock-bot commented on Sep 6, 2019

    @angular-automatic-lock-bot

    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.

  5. locked and limited conversation to collaborators on Sep 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions