You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
And if any coverage is not covered 80% then it is throwing an error in the terminal.
Now, my question: is there any way to check individual files should cover some coverage reports? ()
For example:
I am trying to configure the .nycrc.json in such a way that, individual files should be covered 65% at least and the overall report should be covered 80%.
As the consolated report doesn't pass the 80% then it automatically throws an error in the terminal. In a similar way if the individual file doesn't cover the 65% coverage then it should throw an error like "Single file don't cover in the file: file_name".
So, in .nycrc.json there I want to add two configurations (consolidated coverage & individual coverage) like:
// consolated coverage validation: Check Over all report: already implemented
{
"statements": 80,
"branches": 80,
"functions": 80,
"lines": 80
}
// individual files coverage validation with some other config
{
"statements": 65,
"branches": 65,
"functions": 65,
"lines": 65
}
I am trying to add this validation in nyc config like watermarks for individual files and if the individual files don't cover 65% then it should throw an error or show a warning end of the report.
The text was updated successfully, but these errors were encountered:
artbindu
changed the title
istanbuljs / nyc test coverage report validation along with individual files with different configuration
Feature Request: 🙏🏼 istanbuljs / nyc test coverage report validation along with individual files with different configuration 🙏🏼
Jan 30, 2023
artbindu
changed the title
Feature Request: 🙏🏼 istanbuljs / nyc test coverage report validation along with individual files with different configuration 🙏🏼
Feature Request: istanbuljs / nyc test coverage report validation along with individual files with different configuration 🙏🏼
Jan 30, 2023
Feature Request: istanbuljs / nyc test coverage report validation along with individual files with different configuration 🙏🏼
This is not an issue, needs some confirmation about nyc configuration.
I am writing unit-test cases using mocha, istanbul & nyc.
If we try to check the overall coverage report should cover 80% then
.nycrc.json
configuration as follows:And if any coverage is not covered 80% then it is throwing an error in the terminal.
Now, my question: is there any way to check individual files should cover some coverage reports? (
)
For example:
I am trying to configure the
.nycrc.json
in such a way that, individual files should be covered 65% at least and the overall report should be covered 80%.As the consolated report doesn't pass the 80% then it automatically throws an error in the terminal. In a similar way if the individual file doesn't cover the 65% coverage then it should throw an error like "Single file don't cover in the file: file_name".
So, in
.nycrc.json
there I want to add two configurations (consolidated coverage & individual coverage) like:This is my
.nycrc.json
file:I am trying to add this validation in nyc config like watermarks for individual files and if the individual files don't cover 65% then it should throw an error or show a warning end of the report.
The text was updated successfully, but these errors were encountered: