-
-
Notifications
You must be signed in to change notification settings - Fork 225
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
toBeInRange bug in implementation #670
Comments
Not sure if we should update docs to match the implementation or vice versa. I guess I can see the argument for either, but inclusive on both ends makes the most sense to me (I think 😅). @keeganwitt @mattphillips thoughts? |
Sorry I missed this question. I was trying to think of parallels within JavaScript itself. I'm actually used to the beginning being inclusive, but the end being exclusive. For example, these functions behave that way
As such, I'm actually leaning towards this being a documentation bug. |
Although, the Java equivalents use inclusive, so I could be convinced 😅. |
@SimenB @keeganwitt Any update on this PR? |
Bug in the implementation of toBeInRange. @mayankshukla94
expect([1,2,3]).toBeInRange(1,3) // This should return pass according to documentation
From doc:
Use
.toBeInRange
when checking if an array has elements in range min (inclusive) and max (inclusive).But in the code max value is exclusive.
The text was updated successfully, but these errors were encountered: