karma-runner/karma-coverage

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

mkhodan opened this issue ยท 7 comments

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.

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

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?

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

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

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

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

๐ŸŽ‰ This issue has been resolved in version 2.1.0 ๐ŸŽ‰

The release is available on:

Your semantic-release bot ๐Ÿ“ฆ๐Ÿš€