-
-
Notifications
You must be signed in to change notification settings - Fork 949
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
feat(number): bigint multipleOf #3402
base: next
Are you sure you want to change the base?
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 #3402 +/- ##
=======================================
Coverage 99.97% 99.97%
=======================================
Files 2811 2811
Lines 216972 216993 +21
Branches 943 957 +14
=======================================
+ Hits 216919 216940 +21
Misses 53 53
|
Thanks for your contribution. ❤️ |
I finally had some time to look into you PR and run some tests locally. faker.number.int({ 'min': 6, 'max': 9, 'multipleOf': 5 }) // Error: No suitable integer value between 6 and 9 found.
faker.number.bigInt({ 'min': 6, 'max': 9, 'multipleOf': 5 }) // 10 faker.number.int({ 'min': -9, 'max': 0, 'multipleOf': 5 }) // -5
faker.number.bigInt({ 'min': -9, 'max': 0, 'multipleOf': 5 }) // Error: Multiple of 5n should be less than or equal to max 0n. Please fix these cases and add tests for them. |
Adds the
multipleOf
option tofaker.number.bigInt()
: