Skip to content
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

core/getRandomInRange accepts Min option greater than Max option #307

Closed
theryansmee opened this issue Sep 18, 2022 · 0 comments
Closed
Assignees
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@theryansmee
Copy link
Collaborator

Is this a regression?

No

Description

The following is currently valid:

getRandomInRange({ min: 1_000, max: 1 })

Please provide a link to a minimal reproduction of the bug

No response

Please provide the exception or error you saw

No response

Please provide the environment you discovered this bug in

No response

Anything else?

I would suggest throwing an error such as 'max must be greater than min'.

It's also probably worth writing some tests for this function as it is the centre pin to a lot of our functionality

Do you want to create a pull request?

Yes

@theryansmee theryansmee added bug Something isn't working good first issue Good for newcomers labels Sep 18, 2022
@theryansmee theryansmee self-assigned this Sep 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants