storybookjs / test-runner

🚕 Turn stories into executable tests

Home Page:https://storybook.js.org/docs/writing-tests/interaction-testing

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

exfp2l2 opened this issue · comments

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

Same issue, someone has any working solutions?