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

Bring initial coverage up to 100% #1

Closed
devinivy opened this issue Jul 23, 2020 · 17 comments · Fixed by #7
Closed

Bring initial coverage up to 100% #1

devinivy opened this issue Jul 23, 2020 · 17 comments · Fixed by #7
Labels
help wanted Extra attention is needed test Test or coverage

Comments

@devinivy
Copy link
Member

devinivy commented Jul 23, 2020

As described in hapijs/joi#2411, the hapi ecosystem will no longer depend directly on joi (although it will continue to support joi schemas in route validations). In order to satisfy our internal validation needs we still need a validation library, though! Eran has culled the joi codebase to remove features that we have no need to maintain for our internal purposes, and that is what you find here.

The test suite is fully passing, but coverage for this module began at ~97% with ~150 uncovered lines of code. We would like to bring it up to 100% so that it is in line with our typical standards. This is a tracking issue for anyone interested in contributing to this module's coverage. We could use the help!

I will be posting updates here to the module's coverage. If you want to cover some specific lines, or the lines in a particular file, just post here so we can organize around each other. Make any PRs to the branch named initial-coverage, and please prefer to add tests over adjusting the codebase.

Coverage report

This will be edited as PRs are merged in order to remain up-to-date.
There are 156 130 125 94 60 41 33 20 16 10 remaining lines to cover.

Coverage: 99.81% (10/5373)
[in-progress] lib/errors.js missing coverage on line(s): 55, 59, 60, 115, 116, 149
[in-progress] lib/modify.js missing coverage on line(s): 101, 168, 183, 184
Code coverage below threshold: 99.81 < 100
@devinivy devinivy added help wanted Extra attention is needed test Test or coverage labels Jul 23, 2020
@zemccartney
Copy link
Contributor

@devinivy yo! I'd love to take a shot at helping with this, down for whatever. Any lines in particular you'd prefer I take? I'm also happy to pick a handful at random and post here, whatever's easiest. Thanks!

@devinivy
Copy link
Member Author

@zemccartney sweet, thanks! Just pick some lines or a file and post them here :)

@zemccartney
Copy link
Contributor

woo! cool, thanks! I'll take a shot at lib/types/string.js 🙏

@watofundefined
Copy link
Contributor

Hey, I'll do the common.js.

@patlehmann1
Copy link
Contributor

I'll try grabbing lib/values.js

@WesTyler
Copy link
Contributor

WesTyler commented Jul 24, 2020

I've got a PR here for lib/messages.js coverage.

@devinivy
Copy link
Member Author

devinivy commented Jul 28, 2020

Just want to say this has been going great— thanks for all the help everyone. We have fewer than 100 lines left and are at over 98% coverage 👍 👍

@WesTyler
Copy link
Contributor

I'll see if I can grab some time today/tomorrow to cover lib/types/keys.js

@giovanebribeiro
Copy link

I'll make the lib/errors.js coverage

@geek
Copy link
Member

geek commented Jul 29, 2020

I'm working on lib/template.js

@Marsup
Copy link
Contributor

Marsup commented Jul 29, 2020

Shouldn't a PR be started with what you already have so that reviews can come in early ?

@geek
Copy link
Member

geek commented Jul 29, 2020

Here is the PR for template coverage. This also improved ref and some other areas, current coverage with PR:

Coverage: 98.62% (75/5435)
lib/base.js missing coverage on line(s): 611, 673, 677, 720
lib/compile.js missing coverage on line(s): 200
lib/errors.js missing coverage on line(s): 55, 59, 60, 75, 115, 116, 149
lib/modify.js missing coverage on line(s): 37, 38, 78, 101, 168, 183, 184
lib/ref.js missing coverage on line(s): 237, 334, 335
lib/values.js missing coverage on line(s): 46, 82-84
lib/types/array.js missing coverage on line(s): 230, 232-234, 405, 406, 455, 617, 618, 625-627, 630
lib/types/keys.js missing coverage on line(s): 129, 190, 206, 346, 398, 410, 411, 771, 772, 775, 776, 877, 878, 888, 892
lib/types/string.js missing coverage on line(s): 663, 664, 669-672, 692, 693, 700, 701, 718, 719, 722, 723, 743, 744, 747, 748, 752, 753, 773

@Nargonath
Copy link
Member

I'll work on lib/modify.js

@devinivy
Copy link
Member Author

devinivy commented Aug 1, 2020

We're now over 99%. I am taking lib/base.js, lib/compile.js, and lib/ref.js. Now all lines are accounted for, but if you picked-up some lines and find that you don't have capacity to complete them, of course no problem— just let us know.

@devinivy
Copy link
Member Author

devinivy commented Aug 5, 2020

A few more PRs have landed and we're getting very close: just 16 lines left to cover. Some light pings just to make sure nothing is getting lost:

@Nargonath are you still working through lib/modify.js?
@giovanebribeiro are you still working through lib/errors.js?
@WesTyler there are two lines left in lib/types/keys.js— are you still interested in working on those?

There's no pressure here! Just looking for a. "I am working on it and would like to see it through," b. "I am working on it but I am currently stuck," or c. "I don't have time to work on it or would rather not work on it anymore" and we can go from there :) You can also reach out to me about this in the hapi hour Slack if you'd like.

@Nargonath
Copy link
Member

I'm still working on lib/modify.js and I'd like to see it through but I'll comment the issue in case I get nowhere with the tests.

@giovanebribeiro
Copy link

Hello @devinivy ,

My option is currently this one: b. "I am working on it but I am currently stuck,". I will reach you on slack for some questions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed test Test or coverage
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants