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

Support coverage['100'] in @vitest/coverage-istanbul #3566

Closed
4 tasks done
AriPerkkio opened this issue Jun 13, 2023 · 0 comments · Fixed by #4109
Closed
4 tasks done

Support coverage['100'] in @vitest/coverage-istanbul #3566

AriPerkkio opened this issue Jun 13, 2023 · 0 comments · Fixed by #4109
Labels
feat: coverage Issues and PRs related to the coverage feature pr welcome

Comments

@AriPerkkio
Copy link
Member

AriPerkkio commented Jun 13, 2023

Clear and concise description of the problem

Add support for passing 100: true for @vitest/coverage-istanbul. This is currently supported by @vitest/coverage-v8. It is a shorthand for setting other threshold values to 100.

Suggested solution

{
  test: {
    coverage: {
      provider: 'istanbul',
      100: true,
    }
  }
}

Alternative

It's equal to configuration below. Typically this is used as quick CLI option --coverage.100=true:

{
  test: {
    coverage: {
      provider: 'istanbul',
      lines: 100,
      statements: 100,
      branches: 100,
      functions: 100,
    },
  }
}

Additional context

lines: config['100'] ? 100 : config.lines,
functions: config['100'] ? 100 : config.functions,
branches: config['100'] ? 100 : config.branches,
statements: config['100'] ? 100 : config.statements,

Validations

@AriPerkkio AriPerkkio added pr welcome feat: coverage Issues and PRs related to the coverage feature labels Jun 13, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Sep 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feat: coverage Issues and PRs related to the coverage feature pr welcome
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant