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

[Feature request]: is there a way to fail tests in console when coverage threshold is not met #498

Open
exfp2l2 opened this issue Jul 22, 2024 · 2 comments
Labels
feature request New feature or request needs triage

Comments

@exfp2l2
Copy link

exfp2l2 commented Jul 22, 2024

Is your feature request related to a problem? Please describe.

Hi there :)
Currently I have components that I want to be coverage tested and if they don't meet some threshold to fail them in console.
I have in project folder .nycrc file that look like:
{ "all": true, "check-coverage": true, "branches": 100, "functions": 100, "lines": 100, "statements": 100 }

image

I get a report like that but nothing else :(

Or if there is a workaround would be glad to see it :)

Btw I need it mainly so it fails on ci. If it at least fail on ci would be also great

Describe the solution you'd like

Maybe as a solution to add a tag that will fail these tests. Similar as --failOnConsole but not for browser error but for tests that not meet criteria.

Describe alternatives you've considered

No response

Are you able to assist to bring the feature to reality?

no

Additional context

No response

@exfp2l2 exfp2l2 added feature request New feature or request needs triage labels Jul 22, 2024
@rutsguifd
Copy link

Same issue, someone has any working solutions?

@tsengyushiang
Copy link

tsengyushiang commented Aug 27, 2024

Adding a .nycrc file with the following content might solve your problem:

{
  "all": true,
  "check-coverage": true,
  "branches": 80,
  "functions": 80,
  "lines": 80,
  "statements": 80
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request needs triage
Projects
None yet
Development

No branches or pull requests

3 participants