allow param defaults to be set by the param validations#1103
allow param defaults to be set by the param validations#1103Marsup merged 2 commits intohapijs:masterfrom
Conversation
lib/index.js
Outdated
|
|
||
| if (validateArgs) { | ||
| joi.assert(arg, validateArgs); | ||
| const res = joi.validate(arg, validateArgs); |
There was a problem hiding this comment.
Can you replace with arg = joi.attempt(arg, validateArgs) ?
|
Maybe you'd rather I use |
|
What do you mean not being hit ? The coverage is still 100%. |
|
I needed to add a few expects to cause the |
|
Ah ok, then you reached a better coverage, that's great. |
|
Thanks for the quick turn around and all of your hard work! :-) |
|
It's published. |
|
This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions. |
I found it surprising while making an extension that the defaults I set in the params validation weren't being applied.