Skip to content
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

By defining threshold for coverage I don't want to fail tests but to emit warning. #432

Closed
mkhodan opened this issue Feb 18, 2021 · 7 comments
Labels

Comments

@mkhodan
Copy link

mkhodan commented Feb 18, 2021

In package karma-coverage-istanbul-reporter it was possible to add threshold for coverage and emit warning instead of failing tests. Here's config example:

{
  coverageIstanbulReporter: {
    thresholds: {
      emitWarning: true,
      global: {
        statements: 70,
        lines: 70,
        branches: 70,
        functions: 70
      }
    }
  }
}

Since former package is now deprecated I tried migrating to karma-coverage.
In package karma-coverage config is changed to:

{
  coverageReporter: {
    checks: {
      global: {
        statements: 70,
        lines: 70,
        branches: 70,
        functions: 70
      }
    }
  }
}

I can't add emitWarning: true to prevent tests from failing and emit simple warning.

@mkhodan
Copy link
Author

mkhodan commented Feb 18, 2021

I've create a PR to address this, please see #433

@AliF50
Copy link

AliF50 commented May 11, 2021

Thanks for adding this. Did this make it into karma-coverage@2.0.3? I don't think it did. Can we have it in a new release of 2.0.4?

anthony-redFox added a commit to anthony-redFox/karma-coverage that referenced this issue Aug 6, 2021
@jasonkenneth
Copy link

Thanks for adding this. Did this make it into karma-coverage@2.0.3? I don't think it did. Can we have it in a new release of 2.0.4?

bump

@anthony-redFox
Copy link
Collaborator

@jginsburgn Can you help me release new version. I don't have permission to do it.

@spaque99
Copy link

@anthony-redFox @jginsburgn Any news on releasing a new version with this change?

@jginsburgn
Copy link
Member

I have scheduled to work on this during this quarter. I will try to get to it as soon as possible.

jginsburgn pushed a commit to jginsburgn/karma-coverage that referenced this issue Dec 1, 2021
# [2.1.0](v2.0.3...v2.1.0) (2021-12-01)

### Bug Fixes

* **deps:** update main and dev dependencies ([e7c020c](e7c020c))

### Features

* **reporter:** log coverage threshold as a warning fixed [karma-runner#432](https://github.com/jginsburgn/karma-coverage/issues/432) ([a6c95d8](a6c95d8))
karmarunnerbot pushed a commit that referenced this issue Dec 1, 2021
# [2.1.0](v2.0.3...v2.1.0) (2021-12-01)

### Bug Fixes

* **deps:** update main and dev dependencies ([c20d982](c20d982))

### Features

* **reporter:** log coverage threshold as a warning fixed [#432](#432) ([a6c95d8](a6c95d8))
@karmarunnerbot
Copy link
Member

🎉 This issue has been resolved in version 2.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants