-
-
Notifications
You must be signed in to change notification settings - Fork 920
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
test: properly convert function name to locale entry name #3197
Conversation
✅ Deploy Preview for fakerjs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## next #3197 +/- ##
==========================================
- Coverage 99.96% 99.95% -0.01%
==========================================
Files 2797 2797
Lines 216762 216762
Branches 579 581 +2
==========================================
- Hits 216686 216675 -11
- Misses 76 87 +11 |
Would it be better just to explicitly test each method in turn? Its repetitive but maybe easier to understand. Most other simple modules, even ones which are just helpers.arrayElement wrappers like |
for comparison i made #3198 - i find this easier to read and more consistent with other modules. |
Thanks for creating the PR for comparison. |
Currently, the animal tests use the function name as the name of the entry.
This however doesn't work when the name uses camelCase such as
petName
.This PR changes the locale data lookup to convert the camelCase function name to a snake_case locale entry name before using it.
Required for
Alternative