Set route validation bind context#3227
Conversation
|
How can I fix |
|
By covering all the possibilities in your tests. |
|
so that line looks like this: const bind = request.route.settings.bind || request.route.realm || null;in order to get full coverage, you need tests where |
|
|
||
| return schema(request[source], localOptions, exit); | ||
| const bind = request.route.settings.bind || request.route.realm || null; | ||
| return schema.call(bind, request[source], localOptions, exit); |
There was a problem hiding this comment.
call and apply are not slower than bound functions last time I checked, how would you do it ?
There was a problem hiding this comment.
Change the whole framework so you always pass a context object rather than relying on this 😄
But seriously, yeah there really isn't a way to do that other than call here.
remove unreachable condition when realm is falsy
|
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. |
fixes #3226