Skip to content

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

@exfp2l2

Description

@exfp2l2

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions