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

Position assertions do not assert zero distance correctly #13

Closed
weizhongtan opened this issue Dec 4, 2020 · 2 comments
Closed

Position assertions do not assert zero distance correctly #13

weizhongtan opened this issue Dec 4, 2020 · 2 comments

Comments

@weizhongtan
Copy link

weizhongtan commented Dec 4, 2020

When passing a value of 0 to the below or above assertions, the assertions checks that the actual distance is greater than or equal to 0, rather than exactly equal. I think this is fine as a default if no distance is provided, but when providing a value, I think it makes more sense to do an exact check.

This is because the logic assumes that if the distance is 0 you don't want an exact check:

Happy to raise a PR to fix this if you agree that this behaviour is a bug.

Cheers

@ghost
Copy link

ghost commented Dec 16, 2020

Apologies for the long delay in my response and thank you for flagging this, you raise a valid point and this did not cross my mind previously!

I welcome your contributions, please raise if you do not have the time and I will make sure this is updated.

Thanks

@weizhongtan
Copy link
Author

No problem! Thanks, I'll see if I can get a PR together over the next few weeks.

ghost pushed a commit that referenced this issue Feb 26, 2021
…shold to be set

for certain assertions where there might sometimes be a small px difference.

re #13
@ghost ghost closed this as completed Feb 26, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant