legacy-docs icon indicating copy to clipboard operation
legacy-docs copied to clipboard

Challenges with running test case examples due to missing implementation

Open tafadzwagonera opened this issue 5 years ago • 0 comments

Sometimes the examples in the docs aren't easy to run due to missing implementation. A point in case would be https://adonisjs.com/docs/4.1/testing#_unit_tests Suppose a reader lands on this section but needs to run an example with minimal understanding about the validation module they wouldn't know how to do that without a UserValidator implementation. To run the example in that section they're force to dig through the docs and see how a Validator implementation looks like. And to add to the confusion there's nothing in docs explaining usage of app/Services. This is confusing. I suggest adding a mock implementation of app/Services/UserValidator along with a short explanation about encapsulating reusable functionality in service or helper classes.

tafadzwagonera avatar Jan 11 '21 10:01 tafadzwagonera