Skip to content

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

@mkhodan

Description

@mkhodan

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions