-
-
Notifications
You must be signed in to change notification settings - Fork 944
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
refactor: datatype number #798
Conversation
Codecov Report
@@ Coverage Diff @@
## main #798 +/- ##
==========================================
- Coverage 99.35% 99.34% -0.01%
==========================================
Files 1921 1921
Lines 179086 177121 -1965
Branches 909 907 -2
==========================================
- Hits 177934 175968 -1966
- Misses 1096 1097 +1
Partials 56 56
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See my comment above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if you want to fix this here, but there is a bug in this method for negative numbers.
faker.datatype.number({ min: -5, max: -4 })
never generates -4
due to the if being there (should always apply)
Line 57 in 0b8cac0
if (max >= 0) { |
As an alternative you could just remove the if and its body and add +1 to the max side of the mersenne.rand()
call. That way max
could be a const as well.
No description provided.