-
Notifications
You must be signed in to change notification settings - Fork 147
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
Coverage at 💯 #267
Coverage at 💯 #267
Conversation
With this change the project now has 100% test coverage. The majority of the changes are introducing istanbul flags to ignore sections of code that are hard to get to via testing
Why don't we enforce 100% for now and review it again if we find it to be an issue in upcoming pr's |
So it seems that there are two main reasons to ignore things, For I don't currently see the justification for |
@gibfahn so the main reason I wanted to get the coverage currently to 100% is that it is a number that will not change if we introduce more tests. If we create an arbitrary threshold, that is going to change based on how many files / lines / functions etc... we have in the project. The As for the |
ping @gibfahn /cc @nodejs/citgm can y'all please take a look and chime in regarding this approach |
Sorry @thealphanerd for not replying sooner. I've been giving this some thought, and discussing with colleagues. I understand the aim of having coverage at 100% as a standard, I'm just not sure that the downside of not getting a true figure for coverage checks outweighs the convenience of a number that doesn't change. WindowsIt sounds like @GeorgeAdams95 has the Windows CI stuff pretty much sorted now. When we get windows into CI (which will hopefully be very soon), will it be possible to combine the coverage from different platforms? If not, as we support more platforms will be coverage excluding all non-linux parts of the code? hard-to-reachFor the GeneralIf someone adds more tests, the coverage should never go down right? Are we running the coverage on tests as well? Can we just make a rule in CI that the coverage can never decrease? Obviously we could make exceptions if necessary, but wouldn't that give us the same guarantees as the 100% rule? If we are going to have |
@gibfahn most of the "hard to reach" failures in here are to catch edge cases in child_process itself failing. Testing that is extremely difficult. Other tests are for cases where specific meta data may be missing in objects, we could perhaps find a way to test it, but I have not found a good way just yet |
I'm going to drop this for now but revisit again later |
This change is in two parts
3d553ec which moves the codebase to 100% code coverage. The majority of the work is setting up inline istanbul ignore comments. There is some logic change moving things around and getting rid of dead code... but the bigger changes were broken out.
It is possible some of the changes in the above commit are better suited to be reviewed individually and I'm open to that
2bd60f2 changes the travis.yml file to enforce 100% code coverage for travis to pass.
Perhaps we want to make this a bit more forgiving... perhaps not. We can use this PR to discuss