faker
faker copied to clipboard
Add automated tests for fake patterns
Clear and concise description of the problem
If we add or change fake patterns (or have to review them), we have to manually check for all possible combinations of patterns.
Suggested solution
Add an automated test that checks fake patterns for errors including errors in nested fake patterns.
Alternative
Keep testing by hand.
Additional context
We have to find a way to detect all fake patterns even if they aren't suffixed with pattern.
Found in: https://github.com/faker-js/faker/pull/3324/commits/bfbd0b608fdcf05966cc1f286d315b9d5f7ac26e
- https://github.com/faker-js/faker/pull/3324/commits/bfbd0b608fdcf05966cc1f286d315b9d5f7ac26e
Sounds useful; though what errors specifically would you test for?
The typo i made could have been caught by checking for a balanced number of } and { characters, but not sure how common that would be.